/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2003 The OpenLDAP Foundation.
+ * Copyright 1998-2005 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;
}