* src/tac.c (copy_to_temp): Now that the template string tacXXXXXX
is used in only one place, don't bother using a separate variable.
Also, using three unconditional assignments seems slightly clearer.
if (template == NULL)
{
- char const * const Template = "tacXXXXXX";
- tempdir = getenv ("TMPDIR");
- if (tempdir == NULL)
- tempdir = DEFAULT_TMPDIR;
-
- template = file_name_concat (tempdir, Template, NULL);
+ char *t = getenv ("TMPDIR");
+ tempdir = t ? t : DEFAULT_TMPDIR;
+ template = file_name_concat (tempdir, "tacXXXXXX", NULL);
}
/* FIXME: there's a small window between a successful mkstemp call