From owner-svn-src-all@FreeBSD.ORG Tue May 28 23:43:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4859ED85; Tue, 28 May 2013 23:43:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2095934E; Tue, 28 May 2013 23:43:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4SNhC9Q099541; Tue, 28 May 2013 23:43:12 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4SNhCXp099540; Tue, 28 May 2013 23:43:12 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201305282343.r4SNhCXp099540@svn.freebsd.org> From: Marius Strobl Date: Tue, 28 May 2013 23:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r251083 - stable/9/usr.sbin/rarpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 23:43:12 -0000 Author: marius Date: Tue May 28 23:43:11 2013 New Revision: 251083 URL: http://svnweb.freebsd.org/changeset/base/251083 Log: MFC: r249234 Add some missing newlines and static declarations. Modified: stable/9/usr.sbin/rarpd/rarpd.c Directory Properties: stable/9/usr.sbin/rarpd/ (props changed) Modified: stable/9/usr.sbin/rarpd/rarpd.c ============================================================================== --- stable/9/usr.sbin/rarpd/rarpd.c Tue May 28 23:38:06 2013 (r251082) +++ stable/9/usr.sbin/rarpd/rarpd.c Tue May 28 23:43:11 2013 (r251083) @@ -90,13 +90,13 @@ struct if_info { * The list of all interfaces that are being listened to. rarp_loop() * "selects" on the descriptors in this list. */ -struct if_info *iflist; +static struct if_info *iflist; -int verbose; /* verbose messages */ -const char *tftp_dir = TFTP_DIR; /* tftp directory */ +static int verbose; /* verbose messages */ +static const char *tftp_dir = TFTP_DIR; /* tftp directory */ -int dflag; /* messages to stdout/stderr, not syslog(3) */ -int sflag; /* ignore /tftpboot */ +static int dflag; /* messages to stdout/stderr, not syslog(3) */ +static int sflag; /* ignore /tftpboot */ static u_char zero[6]; @@ -309,6 +309,7 @@ init_one(struct ifaddrs *ifa, char *targ break; } } + /* * Initialize all "candidate" interfaces that are in the system * configuration list. A "candidate" is up, not loopback and not @@ -370,6 +371,7 @@ init(char *target) static void usage(void) { + (void)fprintf(stderr, "%s\n%s\n", "usage: rarpd -a [-dfsv] [-t directory] [-P pidfile]", " rarpd [-dfsv] [-t directory] [-P pidfile] interface"); @@ -631,6 +633,7 @@ rarp_bootable_err: static in_addr_t choose_ipaddr(in_addr_t **alist, in_addr_t net, in_addr_t netmask) { + for (; *alist; ++alist) if ((**alist & netmask) == net) return **alist; @@ -693,17 +696,19 @@ rarp_process(struct if_info *ii, u_char * host (i.e. the guy running rarpd), won't try to ARP for the hardware * address of the guy being booted (he cannot answer the ARP). */ -struct sockaddr_inarp sin_inarp = { +static struct sockaddr_inarp sin_inarp = { sizeof(struct sockaddr_inarp), AF_INET, 0, {0}, {0}, 0, 0 }; -struct sockaddr_dl sin_dl = { + +static struct sockaddr_dl sin_dl = { sizeof(struct sockaddr_dl), AF_LINK, 0, IFT_ETHER, 0, 6, 0, "" }; -struct { + +static struct { struct rt_msghdr rthdr; char rtspace[512]; } rtmsg; @@ -885,6 +890,7 @@ rarp_reply(struct if_info *ii, struct et static in_addr_t ipaddrtonetmask(in_addr_t addr) { + addr = ntohl(addr); if (IN_CLASSA(addr)) return htonl(IN_CLASSA_NET);