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

Ed Schouten ed at FreeBSD.org
Sun Nov 6 18:50:33 UTC 2011


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);


More information about the svn-src-head mailing list