diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-17 20:35:10 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:42 +0000 |
| commit | 5d7e516e33379361c5e5b1005a3a1fd6aea07ae9 (patch) | |
| tree | bd77c4ce343b419f950ed53288ffaf64957a7f81 /util | |
| parent | 2fe71dfb900aeb5af6386bb37cffa3212bef54fb (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; } |
