| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 12 Dec 94 09:41:09 -0500 |
| From: | dj AT stealth DOT ctron DOT com (DJ Delorie) |
| To: | john AT umdsun2 DOT umd DOT umich DOT edu |
| Cc: | djgpp AT sun DOT soe DOT clarkson DOT edu, jmiller AT umdsun2 DOT umd DOT umich DOT edu, |
| emazorow AT umdsun2 DOT umd DOT umich DOT edu, jwaling AT umdsun2 DOT umd DOT umich DOT edu | |
| Subject: | Re: Malloc |
The problem is, you need code like this: buf = malloc(...); if (buf == 0) error(); ok(); In your case, you are considering a NONZERO return to be an error, which means that all valid pointers are errors!
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |