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:
Leah Rowe
2026-03-08 21:37:53 +00:00
parent 61e7147505
commit bd64d118f5
+1 -1
View File
@@ -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;