svn commit: r227246 - head/usr.bin/whois

[ Available lists | Index of svn-src-all | Month of Nov 2011 | Week of 6 Nov 2011 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Ed Schouten <ed@FreeBSD.org>
Date
6 Nov 2011 18:50:33
Subject
svn commit: r227246 - head/usr.bin/whois
Message-ID
201111061850.pA6IoXua036318@svn.freebsd.org


[ Hide this part ]
Author: ed
Date: Sun Nov 6 18:50:33 2011
New Revision: 227246
URL: http://svn.freebsd.org/changeset/base/227246

Log:
Mark global functions and/or variables in whois(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.

Modified:
head/usr.bin/whois/whois.c

Modified: head/usr.bin/whois/whois.c
==============================================================================
--- head/usr.bin/whois/whois.c Sun Nov 6 18:50:26 2011 (r227245)
+++ head/usr.bin/whois/whois.c Sun Nov 6 18:50:33 2011 (r227246)
@@ -81,9 +81,9 @@ __FBSDID("$FreeBSD$");

#define ishost(h) (isalnum((unsigned char)h) || h == '.' || h == '-')

-const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST,
- FNICHOST, NULL };
-const char *port = DEFAULT_PORT;
+static const char *ip_whois[] = { LNICHOST, RNICHOST, PNICHOST, BNICHOST,
+ FNICHOST, NULL };
+static const char *port = DEFAULT_PORT;

static char *choose_server(char *);
static struct addrinfo *gethostinfo(char const *host, int exit_on_error);


Elapsed time: 0.143 seconds