Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!gem.mps.ohio-state.edu!usc!apple!bbn!bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.lang.c Subject: Malloc and lint Message-ID: <2178@prune.bbn.com> Date: 21 Nov 89 23:15:54 GMT References: <10487@xanth.cs.odu.edu> Organization: BBN Systems and Technologies Corporation Lines: 20 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.