[comp.lang.c] Malloc and lint

rsalz@bbn.com (Rich Salz) (11/22/89)

I have found on most BSD machines if you provide your own wrapper
around malloc and declare it to return a "long *" rather than a
"char *" you only get one complaint.  This is good practice anyhow:

	typedef long *align_t;

	align_t
	myalloc(size)
	    unsigned int size;
	{
	    char *p;

	    if (p = malloc(size))
		return (align_t)p;
	    fatal("Ran out of memory");
	    /* NOTREACHED */
	}
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.