handle null arguments to legacy bsd err.h functions
This commit is contained in:
parent
3f80afc505
commit
dc82ee4e30
1 changed files with 2 additions and 2 deletions
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
void vwarn(const char *fmt, va_list ap)
|
void vwarn(const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
vfprintf(stderr, fmt, ap);
|
if (fmt) vfprintf(stderr, fmt, ap);
|
||||||
perror("");
|
perror("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void vwarnx(const char *fmt, va_list ap)
|
void vwarnx(const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
vfprintf(stderr, fmt, ap);
|
if (fmt) vfprintf(stderr, fmt, ap);
|
||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue