summaryrefslogtreecommitdiff
path: root/dseg.c
diff options
context:
space:
mode:
Diffstat (limited to 'dseg.c')
-rw-r--r--dseg.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/dseg.c b/dseg.c
index 120b3ae..80db49a 100644
--- a/dseg.c
+++ b/dseg.c
@@ -50,11 +50,7 @@ static void ent_assign_key(struct dseg_entry* ent) {
switch (ent->type) {
case ENT_STRING:
integral_t strnum = string_counter++;
- int req_sz = snprintf(NULL, 0, STRING_PATTERN, strnum);
- if (req_sz < 0) CCC_PANIC;
- req_sz += 1; // null terminator
- ent->symbol = ccc_alloc(req_sz);
- snprintf(ent->symbol, req_sz, STRING_PATTERN, strnum);
+ ent->symbol = ccc_sprintf(STRING_PATTERN, strnum);
break;
}
}