malloc(0)
Michael Shapiro
shapiro at zorro.cecer.army.mil
Tue Mar 24 07:02:24 EST 1992
I have modified G_malloc() et all to check for requests of 0 bytes
and convert them to requests of 1 byte:
G_malloc(n)
{
char *buf;
if (n <=0) n = 1;
buf = malloc(n);
...etc...
}
-----------------------------------------------------------------
Michael Shapiro U.S. Army CERL
email: shapiro at zorro.cecer.army.mil Environmental Division
phone: (217) 352-6511 ext 526 P.O. Box 9005
fax: (217) 373-7222 Champaign, Ill. 61826-9005
-----------------------------------------------------------------
More information about the grass-dev
mailing list