From 7619bfed6569579822d326678f65cbdd704e3405 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 3 Apr 2026 03:11:27 +0100 Subject: 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 --- util/libreboot-utils/lib/mkhtemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c index d9411104..da44a7e2 100644 --- a/util/libreboot-utils/lib/mkhtemp.c +++ b/util/libreboot-utils/lib/mkhtemp.c @@ -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; -- cgit v1.2.1