Unify GREEDY_REALLOC and GREEDY_REALLOC_T
greedy_realloc() and greedy_realloc0() now store the allocated size as the count, not bytes. Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere, and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just too error-prone to have two slightly different macros which do the same thing.
This commit is contained in:
@@ -515,7 +515,7 @@ static int get_unit_list(
|
||||
|
||||
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
|
||||
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
|
||||
size_t size;
|
||||
size_t size = c;
|
||||
int r;
|
||||
UnitInfo u;
|
||||
|
||||
@@ -523,8 +523,6 @@ static int get_unit_list(
|
||||
assert(unit_infos);
|
||||
assert(_reply);
|
||||
|
||||
size = sizeof(UnitInfo) * c;
|
||||
|
||||
r = sd_bus_call_method(
|
||||
bus,
|
||||
"org.freedesktop.systemd1",
|
||||
|
||||
Reference in New Issue
Block a user