summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
Diffstat (limited to 'job.c')
-rw-r--r--job.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/job.c b/job.c
index 941cf21..07d70c7 100644
--- a/job.c
+++ b/job.c
@@ -2199,14 +2199,15 @@ new_job (struct file *file)
if (trace_flag)
{
char *newer = allocated_variable_expand_for_file ("$?", c->file);
- char *nm;
+ const char *nm;
if (! cmds->fileinfo.filenm)
nm = _("<builtin>");
else
{
- nm = alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);
- sprintf (nm, "%s:%lu", cmds->fileinfo.filenm, cmds->fileinfo.lineno);
+ char *n = alloca (strlen (cmds->fileinfo.filenm) + 1 + 11 + 1);
+ sprintf (n, "%s:%lu", cmds->fileinfo.filenm, cmds->fileinfo.lineno);
+ nm = n;
}
if (newer[0] == '\0')