mktemp: fix warning with glibc 2.15.
Old versions of glibc had warn_unused_result on mktemp(3), despite it always returning its argument. Still, we can silence the warning and save a line, so...
This commit is contained in:
parent
b742998a26
commit
87c0214c49
@ -48,8 +48,7 @@ void mktemp_main(void)
|
||||
? xstrdup(template) : xmprintf("%s/%s", TT.p, template);
|
||||
|
||||
if (toys.optflags & FLAG_u) {
|
||||
mktemp(template);
|
||||
xputs(template);
|
||||
xputs(mktemp(template));
|
||||
} else if (toys.optflags & FLAG_d ? !mkdtemp(template) : mkstemp(template) == -1) {
|
||||
if (toys.optflags & FLAG_q) toys.exitval = 1;
|
||||
else perror_exit("Failed to create %s %s/%s",
|
||||
|
Loading…
Reference in New Issue
Block a user