mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[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:
parent
5535a6a509
commit
826f066e00
1 changed files with 2 additions and 3 deletions
|
@ -446,10 +446,9 @@ new_label_name (void)
|
|||
static int label = 0;
|
||||
int lnum = ++label;
|
||||
const char *fname = current_func->sym->name;
|
||||
char *lname;
|
||||
const char *lname;
|
||||
|
||||
lname = nva ("$%s_%d", fname, lnum);
|
||||
SYS_CHECKMEM (lname);
|
||||
lname = save_string (va ("$%s_%d", fname, lnum));
|
||||
return lname;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue