Commit 9d0baa1a authored by Shawn Webb's avatar Shawn Webb
Browse files

More sanity checks


Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
parent 02856045
......@@ -61,6 +61,10 @@ _lattutil_log_stdio_debug(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -87,6 +91,10 @@ _lattutil_log_stdio_err(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -113,6 +121,10 @@ _lattutil_log_stdio_info(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -139,6 +151,10 @@ _lattutil_log_stdio_warn(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......
......@@ -74,6 +74,10 @@ _lattutil_log_syslog_debug(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -100,6 +104,10 @@ _lattutil_log_syslog_err(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -126,6 +134,10 @@ _lattutil_log_syslog_info(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......@@ -152,6 +164,10 @@ _lattutil_log_syslog_warn(lattutil_log_t *logp, int verbose,
size_t len;
char *msg;
if (logp == NULL || fmt == NULL) {
return (-1);
}
va_start(args, fmt);
if (verbose == -1 || verbose >= logp->ll_verbosity) {
msg = NULL;
......
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