mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -547,7 +547,7 @@ mkhtemp_try_create(int dirfd,
|
|||||||
/* try O_TMPFILE fast path */
|
/* try O_TMPFILE fast path */
|
||||||
if (mkhtemp_tmpfile_linux(dirfd,
|
if (mkhtemp_tmpfile_linux(dirfd,
|
||||||
st_dir_first, fname_copy,
|
st_dir_first, fname_copy,
|
||||||
p, xc, fd, st) == 0) {
|
p, xc, fd, st) >= 0) {
|
||||||
|
|
||||||
errno = saved_errno;
|
errno = saved_errno;
|
||||||
rval = 1;
|
rval = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user