summaryrefslogtreecommitdiffstats
path: root/sys/libkern/memcmp.c
Commit message (Collapse)AuthorAgeFilesLines
* The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmpobrien2008-09-231-0/+53
and bcmp are not the same thing. 'man bcmp' states that the return is "non-zero" if the two byte strings are not identical. Where as, 'man memcmp' states that the return is the "difference between the first two differing bytes (treated as unsigned char values" if the two byte strings are not identical. So provide a proper memcmp(9), but it is a C implementation not a tuned assembly implementation. Therefore bcmp(9) should be preferred over memcmp(9).
OpenPOWER on IntegriCloud