diff --git a/helpers.c b/helpers.c index 1bc5546b..a33340fc 100644 --- a/helpers.c +++ b/helpers.c @@ -197,9 +197,9 @@ void logit(int prio, const char *fmt, ...) fclose(fp); } else { fprintf(stderr, "Failed opening /dev/kmsg for appending ...\n"); + if (prio <= LOG_ERR) + vfprintf(stderr, fmt, ap); } - if (prio <= LOG_ERR) - vfprintf(stderr, fmt, ap); va_end(ap); return; }