From dea547a71036ae3445a5a612f6afd00b76ed721a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 15 May 1997 20:12:53 +0000 Subject: Add multiple-folder support. svn path=/trunk/; revision=1012 --- uid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'uid.c') diff --git a/uid.c b/uid.c index e6fa1b26..c531915a 100644 --- a/uid.c +++ b/uid.c @@ -112,7 +112,7 @@ struct idlist *save_str(struct idlist **idl, int num, const char *str) *end = (struct idlist *)xmalloc(sizeof(struct idlist)); (*end)->val.num = num; - (*end)->id = xstrdup(str); + (*end)->id = str ? xstrdup(str) : (char *)NULL; (*end)->next = NULL; return(*end); @@ -140,7 +140,7 @@ void save_str_pair(struct idlist **idl, const char *str1, const char *str2) continue; *end = (struct idlist *)xmalloc(sizeof(struct idlist)); - (*end)->id = xstrdup(str1); + (*end)->id = str1 ? xstrdup(str1) : (char *)NULL; if (str2) (*end)->val.id2 = xstrdup(str2); else -- cgit v1.2.3