diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /converter/other/ipdb.c | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/ipdb.c')
-rw-r--r-- | converter/other/ipdb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/converter/other/ipdb.c b/converter/other/ipdb.c index 7ee37872..5e4dc82e 100644 --- a/converter/other/ipdb.c +++ b/converter/other/ipdb.c @@ -19,6 +19,7 @@ * Authors: Eric A. Howe (mu@trends.net) * Bryan Henderson, 2010 */ +#define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ #define _BSD_SOURCE /* Ensure strdup() is in <string.h> */ #include <assert.h> @@ -282,8 +283,8 @@ ipdb_image_alloc(const char * const name, if (w != 0 && h != 0) { MALLOCARRAY(imgP->data, w * h); - if (imgP->data) { - memset(imgP->data, 0, sizeof(*(imgP->data)) * w * h); + if (imgP->data != NULL) { + memset(imgP->data, 0, sizeof(*(imgP->data)) * w * h); } else failed = true; } |