summaryrefslogtreecommitdiffstats
path: root/src/core/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/transaction.c')
-rw-r--r--src/core/transaction.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 1d3cf8f1fc..4a55c075b4 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -330,11 +330,11 @@ _pure_ static bool unit_matters_to_anchor(Unit *u, Job *j) {
static char* merge_unit_ids(const char* unit_log_field, char **pairs) {
char **unit_id, **job_type, *ans = NULL;
- size_t alloc = 0, size = 0, next;
+ size_t size = 0, next;
STRV_FOREACH_PAIR(unit_id, job_type, pairs) {
next = strlen(unit_log_field) + strlen(*unit_id);
- if (!GREEDY_REALLOC(ans, alloc, size + next + 1))
+ if (!GREEDY_REALLOC(ans, size + next + 1))
return mfree(ans);
sprintf(ans + size, "%s%s", unit_log_field, *unit_id);