source:
bootcd/isolinux/syslinux-6.03/com32/lib/memcmp.c
@
26ffad7
Last change on this file since 26ffad7 was e16e8f2, checked in by , 3 years ago | |
---|---|
|
|
File size: 247 bytes |
Rev | Line | |
---|---|---|
[e16e8f2] | 1 | /* |
2 | * memcmp.c | |
3 | */ | |
4 | ||
5 | #include <string.h> | |
6 | ||
7 | int memcmp(const void *s1, const void *s2, size_t n) | |
8 | { | |
9 | const unsigned char *c1 = s1, *c2 = s2; | |
10 | int d = 0; | |
11 | ||
12 | while (n--) { | |
13 | d = (int)*c1++ - (int)*c2++; | |
14 | if (d) | |
15 | break; | |
16 | } | |
17 | ||
18 | return d; | |
19 | } |
Note: See TracBrowser
for help on using the repository browser.