[qfcc] Be more consistent with string saving

Not that it really makes any difference for labels since they're
guaranteed unique, but it does remove the question of "why nva instead
of save_string?". Looking at history, save_string came after I changed
it from strdup (va()) to nva(), and then either didn't think to look for
nva or thought it wasn't worth changing.
This commit is contained in:
Bill Currie 2020-03-11 10:50:15 +09:00
parent 5535a6a509
commit 826f066e00

View file

@ -446,10 +446,9 @@ new_label_name (void)
static int label = 0; static int label = 0;
int lnum = ++label; int lnum = ++label;
const char *fname = current_func->sym->name; const char *fname = current_func->sym->name;
char *lname; const char *lname;
lname = nva ("$%s_%d", fname, lnum); lname = save_string (va ("$%s_%d", fname, lnum));
SYS_CHECKMEM (lname);
return lname; return lname;
} }