Skip to content

Commit

Permalink
Simplify error logging
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaud Quette <ArnaudQuette@eaton.com>
  • Loading branch information
aquette committed Mar 15, 2019
1 parent f88b087 commit 3d79006
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
maxage = temp;
return 1;
}
upslogx(LOG_ERR, "Could not convert MAXAGE (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
return 0;
}

Expand All @@ -138,7 +138,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
tracking_delay = temp;
return 1;
}
upslogx(LOG_ERR, "Could not convert TRACKINGDELAY (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
return 0;
}

Expand All @@ -148,7 +148,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
maxconn = temp;
return 1;
}
upslogx(LOG_ERR, "Could not convert MAXCONN (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
return 0;
}

Expand Down Expand Up @@ -187,7 +187,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
certrequest = temp;
return 1;
}
upslogx(LOG_ERR, "Could not convert CERTREQUEST (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
return 0;
}
#endif /* WITH_CLIENT_CERTIFICATE_VALIDATION */
Expand Down

0 comments on commit 3d79006

Please sign in to comment.