summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/strncmp.c
diff options
context:
space:
mode:
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;
}