summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/memcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/memcmp.c')
-rw-r--r--src/lib/libc/string/memcmp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libc/string/memcmp.c b/src/lib/libc/string/memcmp.c
index 4897001e74..6c83208a7b 100644
--- a/src/lib/libc/string/memcmp.c
+++ b/src/lib/libc/string/memcmp.c
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
34static char *rcsid = "$OpenBSD: memcmp.c,v 1.3 2003/06/02 20:18:38 millert Exp $"; 34static char *rcsid = "$OpenBSD: memcmp.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $";
35#endif /* LIBC_SCCS and not lint */ 35#endif /* LIBC_SCCS and not lint */
36 36
37#include <string.h> 37#include <string.h>
@@ -40,12 +40,10 @@ static char *rcsid = "$OpenBSD: memcmp.c,v 1.3 2003/06/02 20:18:38 millert Exp $
40 * Compare memory regions. 40 * Compare memory regions.
41 */ 41 */
42int 42int
43memcmp(s1, s2, n) 43memcmp(const void *s1, const void *s2, size_t n)
44 const void *s1, *s2;
45 size_t n;
46{ 44{
47 if (n != 0) { 45 if (n != 0) {
48 register const unsigned char *p1 = s1, *p2 = s2; 46 const unsigned char *p1 = s1, *p2 = s2;
49 47
50 do { 48 do {
51 if (*p1++ != *p2++) 49 if (*p1++ != *p2++)