mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
util/nvmutil: always restore saved errno
the last lseek there is only there to reset state, so its errors are irrelevant. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1909,8 +1909,7 @@ try_rw_again:
|
|||||||
saved_errno = errno;
|
saved_errno = errno;
|
||||||
if (lseek_loop(fd, off_orig, SEEK_SET,
|
if (lseek_loop(fd, off_orig, SEEK_SET,
|
||||||
loop_eagain, loop_eintr) == (off_t)-1) {
|
loop_eagain, loop_eintr) == (off_t)-1) {
|
||||||
if (r < 0)
|
errno = saved_errno;
|
||||||
errno = saved_errno;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
|
|||||||
Reference in New Issue
Block a user