From 27523f57602a13f733b525ea7fec72a9d6fdcf71 Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 13 Jan 2014 02:38:52 +0000 Subject: [PATCH] warning(), note(), debug(), parse_warn() always return 0, which no caller checks or saves. So just void them all. --- sbin/dhclient/dhcpd.h | 10 +++++----- sbin/dhclient/errwarn.c | 17 +++++------------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index bf64a3399a6..38a7b2f2f57 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.129 2014/01/12 04:17:36 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.130 2014/01/13 02:38:52 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer @@ -216,12 +216,12 @@ void do_packet(unsigned int, struct in_addr, struct ether_addr *); /* errwarn.c */ extern int warnings_occurred; void error(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -int note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +void warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +void note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); #ifdef DEBUG -int debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +void debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); #endif -int parse_warn(char *); +void parse_warn(char *); /* conflex.c */ extern int lexline, lexchar; diff --git a/sbin/dhclient/errwarn.c b/sbin/dhclient/errwarn.c index 57b4e7a7f30..1803538c822 100644 --- a/sbin/dhclient/errwarn.c +++ b/sbin/dhclient/errwarn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: errwarn.c,v 1.20 2013/05/02 16:35:27 krw Exp $ */ +/* $OpenBSD: errwarn.c,v 1.21 2014/01/13 02:38:52 krw Exp $ */ /* Errors and warnings. */ @@ -80,7 +80,7 @@ error(char *fmt, ...) /* * Log a warning message. */ -int +void warning(char *fmt, ...) { va_list list; @@ -97,14 +97,12 @@ warning(char *fmt, ...) write(STDERR_FILENO, mbuf, strlen(mbuf)); write(STDERR_FILENO, "\n", 1); } - - return (0); } /* * Log a note. */ -int +void note(char *fmt, ...) { va_list list; @@ -121,15 +119,13 @@ note(char *fmt, ...) write(STDERR_FILENO, mbuf, strlen(mbuf)); write(STDERR_FILENO, "\n", 1); } - - return (0); } #ifdef DEBUG /* * Log a debug message. */ -int +void debug(char *fmt, ...) { va_list list; @@ -144,12 +140,10 @@ debug(char *fmt, ...) write(STDERR_FILENO, mbuf, strlen(mbuf)); write(STDERR_FILENO, "\n", 1); } - - return (0); } #endif -int +void parse_warn(char *msg) { static char spaces[] = @@ -187,5 +181,4 @@ parse_warn(char *msg) writev(STDERR_FILENO, iov, iovcnt); } warnings_occurred = 1; - return (0); } -- 2.20.1