diff options
Diffstat (limited to 'src/port/memcmp.c')
-rw-r--r-- | src/port/memcmp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/port/memcmp.c b/src/port/memcmp.c index eb20370689c..542c0442182 100644 --- a/src/port/memcmp.c +++ b/src/port/memcmp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/port/memcmp.c,v 1.1 2002/07/18 04:13:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/port/memcmp.c,v 1.2 2002/09/04 20:31:48 momjian Exp $ * * This file was taken from NetBSD and is used by SunOS because memcmp * on that platform does not properly compare negative bytes. @@ -24,10 +24,13 @@ int memcmp(const void *s1, const void *s2, size_t n) { - if (n != 0) { - const unsigned char *p1 = s1, *p2 = s2; + if (n != 0) + { + const unsigned char *p1 = s1, + *p2 = s2; - do { + do + { if (*p1++ != *p2++) return (*--p1 - *--p2); } while (--n != 0); |