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:
Elliott Hughes 2018-12-03 09:54:46 -08:00 committed by Rob Landley
parent b742998a26
commit 87c0214c49

View File

@ -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",