diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-02-26 21:20:00 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-05-30 07:59:05 +0200 |
commit | 65c2929bed8254e5ea24bb2d3d5a403a36daf69e (patch) | |
tree | fe14db1491ac3f3af433278ea0b93fa54391d12d /src/libelogind/sd-bus | |
parent | d6ac074bf95f61aeaa9b81db414cc3089fa22f7a (diff) |
tree-wide: use reallocarray instead of our home-grown realloc_multiply (#8279)
There isn't much difference, but in general we prefer to use the standard
functions. glibc provides reallocarray since version 2.26.
I moved explicit_bzero is configure test to the bottom, so that the two stdlib
functions are at the bottom.
Diffstat (limited to 'src/libelogind/sd-bus')
-rw-r--r-- | src/libelogind/sd-bus/bus-error.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libelogind/sd-bus/bus-error.c b/src/libelogind/sd-bus/bus-error.c index c9517499d..3939d0a4e 100644 --- a/src/libelogind/sd-bus/bus-error.c +++ b/src/libelogind/sd-bus/bus-error.c @@ -595,7 +595,7 @@ _public_ int sd_bus_error_add_map(const sd_bus_error_map *map) { if (additional_error_maps[n] == map) return 0; - maps = realloc_multiply(additional_error_maps, sizeof(struct sd_bus_error_map*), n + 2); + maps = reallocarray(additional_error_maps, n + 2, sizeof(struct sd_bus_error_map*)); if (!maps) return -ENOMEM; |