]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/memcmp.c
cleanup
[openldap] / libraries / liblutil / memcmp.c
index 592f953b98312b334f227290031f68d384ed84a0..c397d35c0ff35235766a86aab7ac5540a4a87a32 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * Memory Compare
  */
 int
-(memcmp)(const void *v1, const void *v2, int n) 
+(lutil_memcmp)(const void *v1, const void *v2, size_t n) 
 {
     if (n != 0) {
                const unsigned char *s1=v1, *s2=v2;
         do {
-            if (*s1++ != *s2++)
-                return (*--s1 - *--s2);
+            if (*s1++ != *s2++) return *--s1 - *--s2;
         } while (--n != 0);
     }
-    return (0);
+    return 0;
 }