mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-04 07:29:56 +01:00
mkstemp returns -1 on failure.
This commit is contained in:
parent
22febff108
commit
025b4507c9
4
main.c
4
main.c
|
|
@ -154,7 +154,7 @@ static int open_tmpoutfile(void)
|
|||
fatal("Failed to allocate outfile name\n");
|
||||
|
||||
fd_out = mkstemp(control.outfile);
|
||||
if (!fd_out)
|
||||
if (fd_out == -1)
|
||||
fatal("Failed to create out tmpfile: %s\n", strerror(errno));
|
||||
return fd_out;
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ static int open_tmpinfile(void)
|
|||
fatal("Failed to allocate infile name\n");
|
||||
|
||||
fd_in = mkstemp(control.infile);
|
||||
if (!fd_in)
|
||||
if (fd_in == -1)
|
||||
fatal("Failed to create in tmpfile: %s\n", strerror(errno));
|
||||
return fd_in;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue