mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue