From 2dcdf7b8850b6435cd6339f6c77a2e83f52b76f3 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 2 Oct 2018 15:10:58 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3372 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/libppmcolor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/libppmcolor.c') diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c index 27340d5f..7079482c 100644 --- a/lib/libppmcolor.c +++ b/lib/libppmcolor.c @@ -9,10 +9,6 @@ ** implied warranty. */ -#define _DEFAULT_SOURCE 1 /* New name for SVID & BSD source defines */ -#define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */ -#define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */ - #include #include #include @@ -194,9 +190,9 @@ processColorfileEntry(struct colorfile_entry const ce, *errorP = NULL; } else { ppm_addtocolorhash(cht, &color, *colornameIndexP); - colornames[*colornameIndexP] = strdup(ce.colorname); + colornames[*colornameIndexP] = pm_strdup(ce.colorname); colors[*colornameIndexP] = color; - if (colornames[*colornameIndexP] == NULL) + if (colornames[*colornameIndexP] == pm_strsol) pm_asprintf(errorP, "Unable to allocate space for color name"); else { *errorP = NULL; -- cgit 1.4.1