diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-17 20:35:10 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-17 20:35:10 +0000 |
| commit | dcdbd5eda1032d0e4be4b4b1b801271e02ae5985 (patch) | |
| tree | e01b886bca2ee4b625c71baccf2e021684996dd1 /util | |
| parent | 952a3d52a5fbe5faa79ee229e35fd8f18f0b89ae (diff) | |
util/nvmutil: tidy up memcmp
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 2eee7a42..6864b03d 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -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; } |
