summaryrefslogtreecommitdiff
path: root/build/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'build/files.c')
-rw-r--r--build/files.c32
1 files changed, 8 insertions, 24 deletions
diff --git a/build/files.c b/build/files.c
index 64764c31f..bb3f5c412 100644
--- a/build/files.c
+++ b/build/files.c
@@ -207,43 +207,27 @@ static void dumpAttrRec(const char * msg, AttrRec ar)
}
#endif
-/* strtokWithQuotes() modified from glibc strtok() */
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
/**
+ * @param s
+ * @param delim
*/
/*@-boundswrite@*/
-static char *strtokWithQuotes(char *s, char *delim)
+/*@null@*/
+static char *strtokWithQuotes(/*@null@*/ char *s, char *delim)
/*@modifies *s @*/
{
static char *olds = NULL;
char *token;
- if (s == NULL) {
+ if (s == NULL)
s = olds;
- }
+ if (s == NULL)
+ return NULL;
/* Skip leading delimiters */
s += strspn(s, delim);
- if (*s == '\0') {
+ if (*s == '\0')
return NULL;
- }
/* Find the end of the token. */
token = s;