mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: make rhex err_if consistent
n + 1 is the same as saying sizeof(rnum) in this case. we should be clear about that, in code. n is irrelevant here, since it is only an index for the return value. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -368,7 +368,8 @@ rhex(void)
|
||||
|
||||
if (!n) {
|
||||
n = sizeof(rnum) - 1;
|
||||
err_if(read(rfd, (uint8_t *) &rnum, n + 1) != sizeof(rnum));
|
||||
err_if(read(rfd, (uint8_t *) &rnum, sizeof(rnum))
|
||||
!= sizeof(rnum));
|
||||
}
|
||||
|
||||
return rnum[n--] & 0xf;
|
||||
|
||||
Reference in New Issue
Block a user