diff options
author | DJ Delorie <dj@redhat.com> | 2005-04-03 04:41:10 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2005-04-03 04:41:10 +0000 |
commit | 14a88c496bef288d66f245d1d07c7bfa7f6062fb (patch) | |
tree | ad4d2c6176db68eb7d06ff8fb67d55395c581e49 /libiberty/bcmp.c | |
parent | 26dae57f146e8b7d546a90c4317389281eb879e7 (diff) | |
download | ppe42-binutils-14a88c496bef288d66f245d1d07c7bfa7f6062fb.tar.gz ppe42-binutils-14a88c496bef288d66f245d1d07c7bfa7f6062fb.zip |
merge from gcc
Diffstat (limited to 'libiberty/bcmp.c')
-rw-r--r-- | libiberty/bcmp.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libiberty/bcmp.c b/libiberty/bcmp.c index 1bd28160f6..c639f9895b 100644 --- a/libiberty/bcmp.c +++ b/libiberty/bcmp.c @@ -15,20 +15,13 @@ result mean @var{x} sorts before @var{y}). */ +#include <stddef.h> + +extern int memcmp(const void *, const void *, size_t); int -bcmp (char *from, char *to, int count) +bcmp (const void *s1, const void *s2, size_t count) { - int rtnval = 0; - - while (count-- > 0) - { - if (*from++ != *to++) - { - rtnval = 1; - break; - } - } - return (rtnval); + return memcmp (s1, s2, count); } |