From: rsalz@osf.org
To: culliton@srg.af.mil, rc@hawkwind.utcs.toronto.edu
Subject: Re: A potentially useful patch
Date: Tue, 21 Sep 1993 10:17:54 -0400 [thread overview]
Message-ID: <9309211417.AA12232@sulphur.osf.org> (raw)
I absolutely hate it when people use #ifdef to break up C flow of
control statements. This seems cleaner and fits Byron's coding
style (using !p for p == NULL -- ick!):
extern void *erealloc(void *p, SIZE_T n) {
extern void *realloc(void *, SIZE_T);
+ #ifdef BROKENREALLOC
+ if (p == NULL)
+ return ealloc(n);
+ #endif
if ((p = realloc(p, n)) == NULL) {
uerror("realloc");
rc_exit(1);
}
return p;
}
/r$
next reply other threads:[~1993-09-21 14:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-09-21 14:17 rsalz [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-09-21 0:33 Tom Culliton x2278
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9309211417.AA12232@sulphur.osf.org \
--to=rsalz@osf.org \
--cc=culliton@srg.af.mil \
--cc=rc@hawkwind.utcs.toronto.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).