From 14a88c496bef288d66f245d1d07c7bfa7f6062fb Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Sun, 3 Apr 2005 04:41:10 +0000 Subject: merge from gcc --- libiberty/bcmp.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'libiberty/bcmp.c') diff --git a/libiberty/bcmp.c b/libiberty/bcmp.c index 1bd2816..c639f98 100644 --- a/libiberty/bcmp.c +++ b/libiberty/bcmp.c @@ -15,20 +15,13 @@ result mean @var{x} sorts before @var{y}). */ +#include + +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); } -- cgit v1.1