[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: monit http/processor.c protocols/protocol.c
From: |
Jan-Henrik Haukeland |
Subject: |
Re: monit http/processor.c protocols/protocol.c |
Date: |
Fri, 04 Jul 2003 21:51:24 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Civil Service, linux) |
Martin Pala <address@hidden> writes:
> before this change redhat9 produced following type of error
> messages (for example):
Okay, I did hack the NEW macro to:
#define NEW(p) ((p)= xcalloc(1, (long)sizeof *(p)))
This means that it's probably a good idea to use this idiom when
constructing new objects:
Object_T x;
NEW(x);
Instead of as we did before
Object_T x= NEW(x);
Alltough I did not get a warning with gcc 2.96 nor with gcc 3.3. (
Anyway I think something is very strange with RH 9.0.)
BTW the reason I changed the NEW macro was so we could easily write
stuff like this:
func foo(param bar) {
Object_T x;
ASSERT(bar);
NEW(x);
--
Jan-Henrik Haukeland