clicon_err: Missed print strerr due to category error.

This commit is contained in:
Olof hagsand 2021-03-30 14:26:22 +02:00
parent 477059f33d
commit 95a820c862
3 changed files with 9 additions and 3 deletions

View file

@ -149,19 +149,24 @@ clicon_err_reset(void)
return 0;
}
/*! Find error category struct given name
*/
static struct clixon_err_cats *
find_category(int category)
{
clixon_err_cats *cec = NULL;
int found = 0;
if ((cec = _err_cat_list) != NULL){
do {
if (cec->cec_category == category)
if (cec->cec_category == category){
found++;
break;
}
cec = NEXTQ(clixon_err_cats *, cec);
} while (cec && cec != _err_cat_list);
}
return cec;
return found?cec:NULL;
}
/*! Report an error.