From owner-cvs-all Sun Jul 22 18: 7:42 2001 Delivered-To: cvs-all@freebsd.org Received: from assaris.sics.se (dhcp114.iss.kth.se [130.237.7.114]) by hub.freebsd.org (Postfix) with ESMTP id 5A2F037B406; Sun, 22 Jul 2001 18:07:35 -0700 (PDT) (envelope-from assar@assaris.sics.se) Received: (from assar@localhost) by assaris.sics.se (8.9.3/8.9.3) id DAA33150; Mon, 23 Jul 2001 03:07:51 +0200 (CEST) (envelope-from assar) To: Alfred Perlstein Cc: Brian Somers , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil ecalloc.c emalloc.3 emalloc.c erealloc.c estrdup.c Makefile libutil.h References: <200107230058.f6N0wig12579@hak.lan.Awfulhak.org> <20010722200226.J49508@sneakerz.org> From: Assar Westerlund Date: 23 Jul 2001 03:07:51 +0200 In-Reply-To: Alfred Perlstein's message of "Sun, 22 Jul 2001 20:02:26 -0500" Message-ID: <5ld76sh2qg.fsf@assaris.sics.se> Lines: 20 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein writes: > > What a bizarre idea. IMHO this is not necessary. Was this discussed > > somewhere ? > > I guess a lot of people use these type of functions, however I > really hate them because they give the programmer the illusion that > if memory fails it's ok to bail. It is usually not as there may > be some external state such as tempfiles of locks to clean up. atexit(3)? But I think this is a rather moot point since these functions exist in lots of programs and it's better to have them in a library. > IMO, better to tap NULL than to exit with your pants around your > ankles. :) Yup. You should only use them with you aren't going to handle a NULL or when you would just exit anyways. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message