summaryrefslogtreecommitdiff
path: root/libc/string/generic
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-03 16:40:31 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-03 16:40:31 +0200
commitfa6546e89e109a249795b889e32573eb85358935 (patch)
treebb24bb92b3d65060c654fb56927a3fec14082304 /libc/string/generic
parentc5f87c865e72d527c85b879be67b5a6fc0cab349 (diff)
string: remove unused variable
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/string/generic')
-rw-r--r--libc/string/generic/strnlen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libc/string/generic/strnlen.c b/libc/string/generic/strnlen.c
index 85819aaa6..b9dc16148 100644
--- a/libc/string/generic/strnlen.c
+++ b/libc/string/generic/strnlen.c
@@ -32,7 +32,7 @@ size_t strnlen (const char *str, size_t maxlen)
{
const char *char_ptr, *end_ptr = str + maxlen;
const unsigned long int *longword_ptr;
- unsigned long int longword, magic_bits, himagic, lomagic;
+ unsigned long int longword, himagic, lomagic;
if (maxlen == 0)
return 0;
@@ -66,14 +66,12 @@ size_t strnlen (const char *str, size_t maxlen)
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
- magic_bits = 0x7efefeffL;
himagic = 0x80808080L;
lomagic = 0x01010101L;
if (sizeof (longword) > 4)
{
/* 64-bit version of the magic. */
/* Do the shift in two steps to avoid a warning if long has 32 bits. */
- magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL;
himagic = ((himagic << 16) << 16) | himagic;
lomagic = ((lomagic << 16) << 16) | lomagic;
}