c141475cfb7e30227e1e1b715b6bf7b4a1436644 max Mon Mar 7 16:35:55 2016 -0800 fix after code review, refs #16971 diff --git src/lib/common.c src/lib/common.c index 6f852e5..c6b05a2 100644 --- src/lib/common.c +++ src/lib/common.c @@ -2268,34 +2268,34 @@ { char *startFirstWord = skipLeadingSpaces(line); if (startFirstWord == NULL) return NULL; char *endFirstWord = skipToSpaces(startFirstWord); if (endFirstWord == NULL) return cloneString(startFirstWord); else return cloneStringZ(startFirstWord, endFirstWord - startFirstWord); } char *cloneNotFirstWord(char *s) /* return part of string after first space, not changing s. Result has to be freed. */ { if (s==NULL) - return emptyForNull(NULL); + return cloneString(""); char* spcPos = stringIn(" ", s); if (spcPos==NULL) - return emptyForNull(NULL); + return cloneString(""); return cloneString(spcPos+1); } char *lastWordInLine(char *line) /* Returns last word in line if any (white space separated). * Returns NULL if string is empty. Removes any terminating white space * from line. */ { char *s = line; char *word = NULL, *wordEnd = NULL; for (;;) { s = skipLeadingSpaces(s); if (s == NULL || s[0] == 0) break;