Re: NULL pointers.
From: Paul Smith <pausmith_at_nortelnetworks.com>
Date: 2003-10-14 00:33:42 CEST
%% Greg Hudson <ghudson@MIT.EDU> writes:
gh> I brought this up in October 2000 and lost then; don't expect to win any
gh> http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=152209
If you're really into solving this sort of problem, there's a trick I've
It turns out the C standard requires that a variable with static storage
It further turns out the standard says that for any initializer which
Sooooo, a simple way of being sure that your memory is initialized
struct some_complex_struct *foo
{
...
Well, anyway, it's simpler than trying to write out assignments for all
If you're a preprocessor kind of hacker, it's even possible to write the
#define SCALLOC(_t,_v) do{ _t __tmp = {0}; \
...
struct some_complex_struct *foo;
SCALLOC(struct some_complex_struct, foo);
It's not an expression, and it has macro side-effects, but... I believe
-- ------------------------------------------------------------------------------- Paul D. Smith <psmith@nortelnetworks.com> HASMAT--HA Software Mthds & Tools "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ------------------------------------------------------------------------------- These are my opinions---Nortel Networks takes no responsibility for them. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Tue Oct 14 00:34:30 2003 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.