Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/whois fix non-literal string format
details: https://anonhg.NetBSD.org/src/rev/03a16cafe16d
branches: trunk
changeset: 768485:03a16cafe16d
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 17 13:57:12 2011 +0000
description:
fix non-literal string format
diffstat:
usr.bin/whois/whois.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r aeaca36f8e4a -r 03a16cafe16d usr.bin/whois/whois.c
--- a/usr.bin/whois/whois.c Wed Aug 17 13:54:31 2011 +0000
+++ b/usr.bin/whois/whois.c Wed Aug 17 13:57:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: whois.c,v 1.34 2009/04/14 08:00:48 lukem Exp $ */
+/* $NetBSD: whois.c,v 1.35 2011/08/17 13:57:12 christos Exp $ */
/* $OpenBSD: whois.c,v 1.28 2003/09/18 22:16:15 fgsch Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static const char sccsid[] = "@(#)whois.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: whois.c,v 1.34 2009/04/14 08:00:48 lukem Exp $");
+__RCSID("$NetBSD: whois.c,v 1.35 2011/08/17 13:57:12 christos Exp $");
#endif
#endif /* not lint */
@@ -216,15 +216,15 @@
if (strcmp(server, "whois.denic.de") == 0 ||
strcmp(server, "de.whois-servers.net") == 0)
- fmt = "-T dn,ace -C ISO-8859-1 %s\r\n";
+ fmt = "-T dn,ace -C ISO-8859-1";
else
- fmt = "%s\r\n";
+ fmt = "";
sfi = fdopen(s, "r");
sfo = fdopen(s, "w");
if (sfi == NULL || sfo == NULL)
err(1, "fdopen");
- (void)fprintf(sfo, fmt, query);
+ (void)fprintf(sfo, "%s%s\r\n", fmt, query);
(void)fflush(sfo);
nhost = NULL;
while ((buf = fgetln(sfi, &len)) != NULL) {
Home |
Main Index |
Thread Index |
Old Index