lbutils/mkhtemp: correct return value check

check if above or equal to zero, except where
counterindicated. this is the usual way on unix,
where a command returns -1 on error, or above/equal
to zero on success.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-04-03 03:11:27 +01:00
parent 9dab2ffa29
commit 7619bfed65
+1 -1
View File
@@ -547,7 +547,7 @@ mkhtemp_try_create(int dirfd,
/* try O_TMPFILE fast path */
if (mkhtemp_tmpfile_linux(dirfd,
st_dir_first, fname_copy,
p, xc, fd, st) == 0) {
p, xc, fd, st) >= 0) {
errno = saved_errno;
rval = 1;