mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 05:00:08 +02:00
util/nvmutil: fix check in set_err()
errno must never be negative Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1378,7 +1378,7 @@ set_err(int x)
|
|||||||
{
|
{
|
||||||
if (errno)
|
if (errno)
|
||||||
return;
|
return;
|
||||||
if (x)
|
if (x > 0)
|
||||||
errno = x;
|
errno = x;
|
||||||
else
|
else
|
||||||
errno = ECANCELED;
|
errno = ECANCELED;
|
||||||
|
|||||||
Reference in New Issue
Block a user