From owner-cvs-all Sun Jul 22 18: 2:41 2001 Delivered-To: cvs-all@freebsd.org Received: from sneakerz.org (sneakerz.org [216.33.66.254]) by hub.freebsd.org (Postfix) with ESMTP id D4D6937B401; Sun, 22 Jul 2001 18:02:36 -0700 (PDT) (envelope-from bright@sneakerz.org) Received: by sneakerz.org (Postfix, from userid 1092) id 3C7A55D01F; Sun, 22 Jul 2001 20:02:26 -0500 (CDT) Date: Sun, 22 Jul 2001 20:02:26 -0500 From: Alfred Perlstein To: Brian Somers Cc: Assar Westerlund , 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 Message-ID: <20010722200226.J49508@sneakerz.org> References: <200107230058.f6N0wig12579@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200107230058.f6N0wig12579@hak.lan.Awfulhak.org>; from brian@Awfulhak.org on Mon, Jul 23, 2001 at 01:58:44AM +0100 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 * Brian Somers [010722 19:58] wrote: > > assar 2001/07/22 15:26:37 PDT > > > > Modified files: > > lib/libutil Makefile libutil.h > > Added files: > > lib/libutil ecalloc.c emalloc.3 emalloc.c erealloc.c > > estrdup.c > > Log: > > add ecalloc, emalloc, erealloc, estrdup - versions of the e-less > > functions that exit instead of failing > > > > Revision Changes Path > > 1.43 +7 -3 src/lib/libutil/Makefile > > 1.33 +5 -1 src/lib/libutil/libutil.h > > 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. IMO, better to tap NULL than to exit with your pants around your ankles. :) -- -Alfred Perlstein [alfred@freebsd.org] Ok, who wrote this damn function called '??'? And why do my programs keep crashing in it? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message