Land #375, adjust va_end calls to match scope

This commit is contained in:
Brent Cook 2018-01-07 16:19:36 -06:00
commit 40e04292a0

View File

@ -34,9 +34,9 @@ err(int eval, const char *fmt, ...)
vfprintf(stderr, fmt, ap);
fprintf(stderr, ": ");
}
va_end(ap);
fprintf(stderr, "%s\n", strerror(sverrno));
exit(eval);
va_end(ap);
}
#if defined(_MSC_VER)
@ -52,9 +52,9 @@ errx(int eval, const char *fmt, ...)
va_start(ap, fmt);
if (fmt != NULL)
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
exit(eval);
va_end(ap);
}
static inline void
@ -68,8 +68,8 @@ warn(const char *fmt, ...)
vfprintf(stderr, fmt, ap);
fprintf(stderr, ": ");
}
fprintf(stderr, "%s\n", strerror(sverrno));
va_end(ap);
fprintf(stderr, "%s\n", strerror(sverrno));
}
static inline void
@ -80,8 +80,8 @@ warnx(const char *fmt, ...)
va_start(ap, fmt);
if (fmt != NULL)
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
fprintf(stderr, "\n");
}
#endif