]> The Tcpdump Group git mirrors - tcpdump/commitdiff
memcmp() doesn't modify either of its arguments.
authorGuy Harris <[email protected]>
Thu, 16 Jan 2014 07:03:31 +0000 (23:03 -0800)
committerGuy Harris <[email protected]>
Thu, 16 Jan 2014 07:03:53 +0000 (23:03 -0800)
interface.h
netdissect.h
util.c

index 0ac231ce55810a466072314d5d4d7b167651d849..783839c155f6647fb7da19c7c8e7f3e54ddef5eb 100644 (file)
@@ -159,7 +159,7 @@ extern void safeputchar(int);
 extern void safeputs(const char *, int);
 
 extern void unaligned_memcpy(void *, const void *, size_t);
-extern int unaligned_memcmp(void *, const void *, size_t);
+extern int unaligned_memcmp(const void *, const void *, size_t);
 
 extern const char *isonsap_string(const u_char *, register u_int);
 extern const char *protoid_string(const u_char *);
index af535de3caff345283df3f2836d26baeb67a89d7..01a2c2a8ffda85391f30795ec6fcf0b55a308aa5 100644 (file)
@@ -271,7 +271,7 @@ extern void safeputchar(int);
 extern void safeputs(const char *, int);
 
 extern void unaligned_memcpy(void *, const void *, size_t);
-extern int unaligned_memcmp(void *, const void *, size_t);
+extern int unaligned_memcmp(const void *, const void *, size_t);
 
 #define PLURAL_SUFFIX(n) \
        (((n) != 1) ? "s" : "")
diff --git a/util.c b/util.c
index f243390b2cf742d04df3b80c321c5bc03930e739..5b92b47438ef2e9b069cc61add82b0f71302bc70 100644 (file)
--- a/util.c
+++ b/util.c
@@ -615,7 +615,7 @@ unaligned_memcpy(void *p, const void *q, size_t l)
 
 /* As with memcpy(), so with memcmp(). */
 int
-unaligned_memcmp(void *p, const void *q, size_t l)
+unaligned_memcmp(const void *p, const void *q, size_t l)
 {
        return (memcmp(p, q, l));
 }