aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/strtok.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/strtok.c')
-rw-r--r--sysdeps/generic/strtok.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/generic/strtok.c b/sysdeps/generic/strtok.c
index b6f952385c..451fd1e88c 100644
--- a/sysdeps/generic/strtok.c
+++ b/sysdeps/generic/strtok.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1996,1997,1999,2000,2001 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
@@ -45,7 +45,10 @@ strtok (s, delim)
/* Scan leading delimiters. */
s += strspn (s, delim);
if (*s == '\0')
- return NULL;
+ {
+ olds = s;
+ return NULL;
+ }
/* Find the end of the token. */
token = s;