X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libiberty%2Fbcmp.c;h=c639f9895bcf35f5a5ef96e93b97177b471124ff;hb=3559ed3fa4b4b8496dc304e3eb35ef468f7c3601;hp=1895773d52d488762635d834b703c958b64afb85;hpb=2ee563b53258d390d7446e90a67f465d504ae44c;p=binutils-gdb.git diff --git a/libiberty/bcmp.c b/libiberty/bcmp.c index 1895773d52d..c639f9895bc 100644 --- a/libiberty/bcmp.c +++ b/libiberty/bcmp.c @@ -15,22 +15,13 @@ result mean @var{x} sorts before @var{y}). */ +#include + +extern int memcmp(const void *, const void *, size_t); int -bcmp (from, to, count) - char *from, *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); }