diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-04-10 09:48:59 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-04-12 10:20:55 -0400 |
commit | ca2d37841476e6272c9957c3f5a0cbe869a531ca (patch) | |
tree | ab1dea346bd6342248858be26e9638437141a0d1 /src/systemctl | |
parent | 7cc832b91e8f5883b505c42f9f403e03dfc83c89 (diff) |
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.
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 653a3247b4..8fd7bc9608 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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", |