Commit 3d614131 authored by Guillem Jover's avatar Guillem Jover

Base errc() and warnc() on vwarnc() and verrc() respectively

parent 87232260
/*
* Copyright © 2006 Robert Millan
* Copyright © 2011 Guillem Jover <guillem@hadrons.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -31,15 +32,10 @@
void
warnc(int code, const char *format, ...)
{
int tmp = errno;
va_list ap;
va_start(ap, format);
errno = code;
warn(format, ap);
errno = tmp;
vwarnc(code, format, ap);
va_end(ap);
}
......@@ -59,10 +55,7 @@ errc(int status, int code, const char *format, ...)
va_list ap;
va_start(ap, format);
errno = code;
err(status, format, ap);
verrc(status, code, format, ap);
va_end(ap);
}
......
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