From: Florian Forster Date: Tue, 21 Nov 2017 09:39:44 +0000 (+0100) Subject: Merge branch 'collectd-5.8' X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=072244d2e10336241610a1a0448a8149e9c77e7e;p=collectd.git Merge branch 'collectd-5.8' --- 072244d2e10336241610a1a0448a8149e9c77e7e diff --cc src/table.c index 80eca959,7cae3f79..cfe9a589 --- a/src/table.c +++ b/src/table.c @@@ -177,9 -174,11 +173,10 @@@ static int tbl_config_result(tbl_t *tbl return 1; } - res = realloc(tbl->results, (tbl->results_num + 1) * sizeof(*tbl->results)); + tbl_result_t *res = + realloc(tbl->results, (tbl->results_num + 1) * sizeof(*tbl->results)); if (res == NULL) { - char errbuf[1024]; - log_err("realloc failed: %s.", sstrerror(errno, errbuf, sizeof(errbuf))); + log_err("realloc failed: %s.", STRERRNO); return -1; } @@@ -239,9 -233,10 +231,9 @@@ static int tbl_config_table(oconfig_ite return 1; } - tbl = realloc(tables, (tables_num + 1) * sizeof(*tables)); + tbl_t *tbl = realloc(tables, (tables_num + 1) * sizeof(*tables)); if (NULL == tbl) { - char errbuf[1024]; - log_err("realloc failed: %s.", sstrerror(errno, errbuf, sizeof(errbuf))); + log_err("realloc failed: %s.", STRERRNO); return -1; }