Re: xmalloc string functions
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Mon, 28 Jan 2008 01:09:07 -0500
Yevgen Muntyan wrote:
William Ahern wrote:.... snip ...
To my mind, there's no difference in effort required to handle a
NULL return from fopen(), than a NULL return from malloc(). Maybe
more typing.
Then you are just really good. Because it's enormously more
typing. And more than that, it's more design questions too:
"what do I do in this situation, which I can't even possibly
test?" All this apart from real problems you have to solve.
Yes, *real*. No, g_malloc() aborting an application is not
a real problem. Not for a regular desktop application.
Oh? Do you detect a major difference in typing between:
ptr = xmalloc(sizeof *ptr);
and
if (!(ptr = malloc(sizeof *ptr))) fixit(sizeof *ptr);
and you can actually select the appropriate fixit function!!
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- References:
- xmalloc string functions
- From: Malcolm McLean
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- Re: xmalloc string functions
- From: William Ahern
- Re: xmalloc string functions
- From: Yevgen Muntyan
- xmalloc string functions
- Prev by Date: Re: time in threaded programs
- Next by Date: Re: time in threaded programs
- Previous by thread: Re: xmalloc string functions
- Next by thread: Re: xmalloc string functions
- Index(es):
Relevant Pages
|