Bug in Conf 2.0

Keith Gabryelski ag at elgar.UUCP
Fri Sep 30 15:53:26 AEST 1988


In article <359 at Grumpy.UUCP> wgh at Grumpy.UUCP (William G. Hutchison) writes:
>I compiled conf on a Unisys 7000/52 (CCI Tahoe) running SysV rel 2.
>I found that malloc was being called to allocate zero bytes: I did not
>have time to find out why. [...] With that fix, conf works fine.

I didn't think mallocing zero bytes was a problem.  It seemed
reasonable to me to ask malloc() for a pointer that could be realloced
and has no length (for initialization purposes).  Actually, it doesn't
seem to reasonable to me any more.

Possibly a better move would be to initialize the pointer to NULL and
have myrealloc() [a front end to realloc()] handle null pointers.
Since myrealloc() already handles null pointers and I could only find
one reference to mymalloc(0) [in confrots.c] this would be a piece 'o
cake to fix.

Pax, Keith

-- 
     It took no computation, to dance to the rock 'n roll station.
[  Keith   ]  UUCP: {ucsd, cbosgd!crash, sdcsvax!crash, nosc!crash}!elgar!ag
[Gabryelski]  INET: ag at elgar.cts.com                 ARPA: elgar!ag at ucsd.edu



More information about the Comp.sources.bugs mailing list