X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fbcmp.c;h=c639f9895bcf35f5a5ef96e93b97177b471124ff;hb=7d458ea516b58c98214406859d57965879019215;hp=1bd28160f696a838f98c0afadedb851039c46167;hpb=9334f9c6cd576128ec4fc891b5fcf267a7fca7fb;p=deliverable%2Fbinutils-gdb.git 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 + +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); }