Commit 5e792fa5 authored by Robert Schmidt's avatar Robert Schmidt

Fix warning of ignored return val of asprintf

parent 2483ba42
...@@ -225,10 +225,12 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams ...@@ -225,10 +225,12 @@ int config_getlist(paramlist_def_t *ParamList, paramdef_t *params, int numparams
const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix); const int ret = config_get_if()->getlist(ParamList, params, numparams, prefix);
if (ret >= 0 && params) { if (ret >= 0 && params) {
char *newprefix; char *newprefix;
if (prefix) if (prefix) {
asprintf(&newprefix, "%s.%s", prefix, ParamList->listname); int rc = asprintf(&newprefix, "%s.%s", prefix, ParamList->listname);
else if (rc < 0) newprefix = NULL;
} else {
newprefix = ParamList->listname; newprefix = ParamList->listname;
}
char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */ char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */
for (int i = 0; i < ParamList->numelt; ++i) { for (int i = 0; i < ParamList->numelt; ++i) {
// TODO config_process_cmdline? // TODO config_process_cmdline?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment