Fixes for 4.4 release

This commit is contained in:
Olof hagsand 2020-03-24 16:41:30 +01:00
parent 09a2e09848
commit a7e0a30938
7 changed files with 22 additions and 11 deletions

View file

@ -77,8 +77,8 @@ struct err_state{
/*
* Variables
*/
int clicon_errno = 0; /* See enum clicon_err */
int clicon_suberrno = 0; /* Corresponds to errno.h */
int clicon_errno = 0; /* See enum clicon_err XXX: hide this and change to err_category */
int clicon_suberrno = 0; /* Corresponds to errno.h XXX: change to errno */
char clicon_err_reason[ERR_STRLEN] = {0, };
/*
@ -147,7 +147,7 @@ clicon_err_reset(void)
int clicon_err_fn(const char *fn,
const int line,
int category,
int err,
int suberr,
char *format, ...)
{
va_list args;
@ -157,7 +157,7 @@ int clicon_err_fn(const char *fn,
/* Set the global variables */
clicon_errno = category;
clicon_suberrno = errno;
clicon_suberrno = suberr;
/* first round: compute length of error message */
va_start(args, format);