X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblutil%2Fmemcmp.c;h=c397d35c0ff35235766a86aab7ac5540a4a87a32;hb=d8eace75a7472731d78f61df01e648e8af8deee5;hp=592f953b98312b334f227290031f68d384ed84a0;hpb=3c598e89fb34a892d369a138daa8c3314294493c;p=openldap diff --git a/libraries/liblutil/memcmp.c b/libraries/liblutil/memcmp.c index 592f953b98..c397d35c0f 100644 --- a/libraries/liblutil/memcmp.c +++ b/libraries/liblutil/memcmp.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * 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 @@ -21,14 +21,13 @@ * 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; }