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:
Zbigniew Jędrzejewski-Szmek
2014-04-12 10:20:55 -04:00
parent 7cc832b91e
commit ca2d378414
7 changed files with 46 additions and 60 deletions
+1 -3
View File
@@ -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",