From 6711b9aec778c8309e8ebcee69fb157ccfbfa284 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 23 Feb 2008 15:53:22 +0000 Subject: use the proper variable. --- lib/libc/string/strcspn.c | 6 +++--- lib/libc/string/strspn.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libc/string') 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 -__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 #include @@ -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 -__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 #include @@ -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; } -- cgit