summaryrefslogtreecommitdiff
path: root/sys/lib/libkern/scanc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-08-07 00:38:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-08-07 00:38:34 +0000
commit6199f15e3e0651e8399ad97e919a96d69d128ee2 (patch)
treecde8dbb44682b9bafafa3ec82a63352162d5cf59 /sys/lib/libkern/scanc.c
parentf8b1d50fcd985a3171e1d491c63c553aff62c2a7 (diff)
ansi and some missing protos
Diffstat (limited to 'sys/lib/libkern/scanc.c')
-rw-r--r--sys/lib/libkern/scanc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/lib/libkern/scanc.c b/sys/lib/libkern/scanc.c
index 82b7e37cd30..0ebd9344333 100644
--- a/sys/lib/libkern/scanc.c
+++ b/sys/lib/libkern/scanc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scanc.c,v 1.4 2003/06/02 23:28:08 millert Exp $ */
+/* $OpenBSD: scanc.c,v 1.5 2004/08/07 00:38:33 deraadt Exp $ */
/* $NetBSD: scanc.c,v 1.3 1996/03/14 18:52:16 christos Exp $ */
/*
@@ -36,14 +36,11 @@
#include <lib/libkern/libkern.h>
int
-scanc(size, cp, table, mask)
- u_int size;
- register const u_char *cp, table[];
- register u_char mask;
+scanc(u_int size, const u_char *cp, const u_char table[], int mask)
{
- register const u_char *end = &cp[size];
+ const u_char *end = &cp[size];
- while (cp < end && (table[*cp] & mask) == 0)
+ while (cp < end && (table[*cp] & (u_char)mask) == 0)
cp++;
return (end - cp);
}