Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!zaphod.mps.ohio-state.edu!wuarchive!rex!ukma!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: What does malloc(0) return? Message-ID: <16317@smoke.brl.mil> Date: 31 May 91 19:17:48 GMT References: <11614@ncar.ucar.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 6 In article <11614@ncar.ucar.edu> steve@unidata.ucar.edu (Steve Emmerson) writes: >The subject-line says it all and my K&R2 is silent on the matter. malloc(0) should return either NULL or a pointer to some storage location. Technically the behavior is undefined, since there are no objects of the specified size (0) according to the standard.