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)
return;
if (x)
if (x > 0)
errno = x;
else
errno = ECANCELED;