Skip site navigation (1)Skip section navigation (2)
Date:      23 Jul 2001 03:07:51 +0200
From:      Assar Westerlund <assar@FreeBSD.org>
To:        Alfred Perlstein <bright@sneakerz.org>
Cc:        Brian Somers <brian@Awfulhak.org>, 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:  <5ld76sh2qg.fsf@assaris.sics.se>
In-Reply-To: Alfred Perlstein's message of "Sun, 22 Jul 2001 20:02:26 -0500"
References:  <assar@FreeBSD.org> <200107230058.f6N0wig12579@hak.lan.Awfulhak.org> <20010722200226.J49508@sneakerz.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein <bright@sneakerz.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5ld76sh2qg.fsf>