summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/strncmp.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-11 06:23:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-11 06:23:10 +0000
commit16824dd3bbb4d43b141d300c76afbdd0c30fa7b9 (patch)
tree08f2b84878ea46e749b47e3b2953507245ad5384 /sys/lib/libsa/strncmp.c
parent678b21869f24e6ddc3a341fad1a87c353c5464ca (diff)
ansification and knf and protos
Diffstat (limited to 'sys/lib/libsa/strncmp.c')
-rw-r--r--sys/lib/libsa/strncmp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/lib/libsa/strncmp.c b/sys/lib/libsa/strncmp.c
index f405e428378..48541b12afd 100644
--- a/sys/lib/libsa/strncmp.c
+++ b/sys/lib/libsa/strncmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strncmp.c,v 1.3 2003/06/02 20:20:53 mickey Exp $ */
+/* $OpenBSD: strncmp.c,v 1.4 2003/08/11 06:23:09 deraadt Exp $ */
/*-
* Copyright (c) 1996 Michael Shalayeff
@@ -31,15 +31,12 @@
#include "stand.h"
int
-strncmp(s1, s2, len)
- register const char *s1;
- register const char *s2;
- register size_t len;
+strncmp(const char *s1, const char *s2, size_t len)
{
if (len-- == 0)
return 0;
- while(*s1 && *s2 && len-- && *s1 == *s2)
+ while (*s1 && *s2 && len-- && *s1 == *s2)
s1++, s2++;
return *s1 - *s2;
}