From 051460ccd37e6982cd21789ae710f25a29639da4 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 16 Apr 2014 18:46:41 +0000 Subject: [PATCH] Make dhclient -q even quieter. Make it immediately effective rather than possibly emitting a couple of random memory allocation error messages first. ok guenther@ --- sbin/dhclient/dhclient.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index a3f5d8a19f5..7698bf6dc67 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.294 2014/04/16 13:57:58 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.295 2014/04/16 18:46:41 krw Exp $ */ /* * Copyright 2004 Henning Brauer @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) { struct stat sb; - int ch, fd, quiet = 0, i = 0, socket_fd[2]; + int ch, fd, i = 0, socket_fd[2]; extern char *__progname; struct passwd *pw; char *ignore_list = NULL; @@ -430,7 +430,7 @@ main(int argc, char *argv[]) } break; case 'q': - quiet = 1; + log_perror = 0; break; case 'u': unknown_ok = 0; @@ -463,9 +463,6 @@ main(int argc, char *argv[]) _PATH_DHCLIENT_DB, ifi->name) == -1) error("asprintf"); - if (quiet) - log_perror = 0; - tzset(); memset(&sockaddr_broadcast, 0, sizeof(sockaddr_broadcast)); -- 2.20.1