Skip to content
Snippets Groups Projects
Commit 05262f66 authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Fix warning of ignored return val of asprintf

parent b1d1d4c8
No related branches found
No related tags found
No related merge requests found
......@@ -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);
if (ret >= 0 && params) {
char *newprefix;
if (prefix)
asprintf(&newprefix, "%s.%s", prefix, ParamList->listname);
else
if (prefix) {
int rc = asprintf(&newprefix, "%s.%s", prefix, ParamList->listname);
if (rc < 0) newprefix = NULL;
} else {
newprefix = ParamList->listname;
}
char cfgpath[MAX_OPTNAME_SIZE*2 + 6]; /* prefix.listname.[listindex] */
for (int i = 0; i < ParamList->numelt; ++i) {
// TODO config_process_cmdline?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment