tmpfiles: rename second parameter to GREEDY_REALLOC() 'allocated'

We pretty much always name it like that, and it is very descriptive,
hence let's stick to that nomenclature here.
This commit is contained in:
Lennart Poettering 2018-10-25 13:48:25 +02:00
parent ae1940d294
commit 647687141a

View file

@ -136,7 +136,7 @@ typedef struct Item {
typedef struct ItemArray { typedef struct ItemArray {
Item *items; Item *items;
size_t count; size_t count;
size_t size; size_t allocated;
} ItemArray; } ItemArray;
typedef enum DirectoryType { typedef enum DirectoryType {
@ -2795,7 +2795,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer, bool
return log_oom(); return log_oom();
} }
if (!GREEDY_REALLOC(existing->items, existing->size, existing->count + 1)) if (!GREEDY_REALLOC(existing->items, existing->allocated, existing->count + 1))
return log_oom(); return log_oom();
memcpy(existing->items + existing->count++, &i, sizeof(i)); memcpy(existing->items + existing->count++, &i, sizeof(i));