diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2022-12-10 15:15:33 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2022-12-10 15:15:33 -0500 |
commit | 5e14db43b7212b52f1cfcd2b0fce41df7fc419eb (patch) | |
tree | 1ae34085634983b89f972101f51785ce4d7ff30b /src/data_config.c | |
parent | abf470bebe446db762e01d04e894691390da7d45 (diff) | |
download | lighttpd-git-5e14db43b7212b52f1cfcd2b0fce41df7fc419eb.tar.gz |
[multiple] employ ck_calloc, ck_malloc shared code
employ ck_calloc(), ck_malloc() shared code to slightly reduce code size
(centralize the ck_assert() to check that memory allocation succeeded)
Diffstat (limited to 'src/data_config.c')
-rw-r--r-- | src/data_config.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/data_config.c b/src/data_config.c index 0b5d8170..7ae6a514 100644 --- a/src/data_config.c +++ b/src/data_config.c @@ -62,10 +62,7 @@ data_config *data_config_init(void) { data_config_free, NULL }; - data_config *ds; - - ds = calloc(1, sizeof(*ds)); - force_assert(ds); + data_config *ds = ck_calloc(1, sizeof(*ds)); ds->comp_key = ""; ds->value = array_init(4); |