From a17d41bfba66ed9e57f41a10e4891c6c0ab0815d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ritschard Date: Sat, 24 May 2008 00:42:36 +0000 Subject: Enclose an informational message in a verbose check. From Alexander Hall ok henning@, ``I suppose so'' deraadt@ --- usr.bin/ftp/ftp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index faca5d16581..3ad6cd3a69d 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp.c,v 1.69 2008/04/12 21:20:58 ray Exp $ */ +/* $OpenBSD: ftp.c,v 1.70 2008/05/24 00:42:35 pyr Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* @@ -60,7 +60,7 @@ */ #if !defined(lint) && !defined(SMALL) -static const char rcsid[] = "$OpenBSD: ftp.c,v 1.69 2008/04/12 21:20:58 ray Exp $"; +static const char rcsid[] = "$OpenBSD: ftp.c,v 1.70 2008/05/24 00:42:35 pyr Exp $"; #endif /* not lint and not SMALL */ #include @@ -179,7 +179,8 @@ hookup(char *host, char *port) if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) strlcpy(hbuf, "unknown", sizeof(hbuf)); - fprintf(ttyout, "Trying %s...\n", hbuf); + if (verbose) + fprintf(ttyout, "Trying %s...\n", hbuf); } s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s < 0) { -- cgit v1.2.3