Remove DEBUG-define for eprintf.c

Prepend program name only when fmt doesn't begin with "usage".
This commit is contained in:
FRIGN
2015-04-05 00:34:58 +02:00
committed by sin
parent 0c470f5563
commit 3eee8e1509
2 changed files with 5 additions and 7 deletions

View File

@@ -33,9 +33,8 @@ enprintf(int status, const char *fmt, ...)
void
venprintf(int status, const char *fmt, va_list ap)
{
#ifdef DEBUG
fprintf(stderr, "%s: ", argv0);
#endif
if (strncmp(fmt, "usage", strlen("usage")))
fprintf(stderr, "%s: ", argv0);
vfprintf(stderr, fmt, ap);
@@ -52,9 +51,8 @@ weprintf(const char *fmt, ...)
{
va_list ap;
#ifdef DEBUG
fprintf(stderr, "%s: ", argv0);
#endif
if (strncmp(fmt, "usage", strlen("usage")))
fprintf(stderr, "%s: ", argv0);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);