summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2008-02-23 15:53:22 +0000
committerchristos <christos@NetBSD.org>2008-02-23 15:53:22 +0000
commit6711b9aec778c8309e8ebcee69fb157ccfbfa284 (patch)
tree3fab470c29783420eba550653d9db1cb28709fa6 /lib/libc
parent8fbaff10052cd6ecebbf0240cf9b0926e3c09b79 (diff)
use the proper variable.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strcspn.c6
-rw-r--r--lib/libc/string/strspn.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/string/strcspn.c b/lib/libc/string/strcspn.c
index 46b1c51ad11..8ab767979dd 100644
--- a/lib/libc/string/strcspn.c
+++ b/lib/libc/string/strcspn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strcspn.c,v 1.14 2008/02/23 15:18:04 christos Exp $ */
+/* $NetBSD: strcspn.c,v 1.15 2008/02/23 15:53:22 christos Exp $ */
/*-
* Copyright (c) 2008 Joerg Sonnenberger
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: strcspn.c,v 1.14 2008/02/23 15:18:04 christos Exp $");
+__RCSID("$NetBSD: strcspn.c,v 1.15 2008/02/23 15:53:22 christos Exp $");
#include <assert.h>
#include <inttypes.h>
@@ -49,7 +49,7 @@ strcspn(const char *s, const char *charset)
set[UC(*charset) >> 3] |= idx[UC(*charset) & 7];
for (t = s; *t != '\0'; ++t)
- if (set[UC(*s) >> 3] & idx[UC(*s) & 7])
+ if (set[UC(*t) >> 3] & idx[UC(*t) & 7])
break;
return t - s;
}
diff --git a/lib/libc/string/strspn.c b/lib/libc/string/strspn.c
index 64d9c5c9a71..887e3ddb067 100644
--- a/lib/libc/string/strspn.c
+++ b/lib/libc/string/strspn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strspn.c,v 1.14 2008/02/23 15:18:04 christos Exp $ */
+/* $NetBSD: strspn.c,v 1.15 2008/02/23 15:53:22 christos Exp $ */
/*-
* Copyright (c) 2008 Joerg Sonnenberger
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: strspn.c,v 1.14 2008/02/23 15:18:04 christos Exp $");
+__RCSID("$NetBSD: strspn.c,v 1.15 2008/02/23 15:53:22 christos Exp $");
#include <assert.h>
#include <inttypes.h>
@@ -50,7 +50,7 @@ strspn(const char *s, const char *charset)
set[UC(*charset) >> 3] |= idx[UC(*charset) & 7];
for (t = s; *t != '\0'; ++t)
- if ((set[UC(*s) >> 3] & idx[UC(*s) & 7]) == 0)
+ if ((set[UC(*t) >> 3] & idx[UC(*t) & 7]) == 0)
break;
return t - s;
}