util/nvmutil: fix errno zero on exit return

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-04-22 03:15:41 +01:00
parent 40cb95b15e
commit d6658eb062
+4 -2
View File
@@ -433,8 +433,10 @@ cmd_copy(void)
void
cmd_swap(void) {
err_if(!(goodChecksum(0) || goodChecksum(1)));
errno = 0;
if(!(goodChecksum(0) || goodChecksum(1))) {
errno = EINVAL;
err(EXIT_FAILURE, "Invalid checksums");
}
gbe[0] ^= gbe[1];
gbe[1] ^= gbe[0];