mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: tidy up memcmp
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -2784,12 +2784,9 @@ x_i_memcmp(const void *a, const void *b, unsigned long n)
|
||||
const unsigned char *pa = (const unsigned char *)a;
|
||||
const unsigned char *pb = (const unsigned char *)b;
|
||||
|
||||
while (n--) {
|
||||
for ( ; n--; ++pa, ++pb)
|
||||
if (*pa != *pb)
|
||||
return *pa - *pb;
|
||||
pa++;
|
||||
pb++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user