From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 22 14:21:15 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DEFC106564A; Mon, 22 Jun 2009 14:21:15 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B24C8FC16; Mon, 22 Jun 2009 14:21:15 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5MELEfd043394; Mon, 22 Jun 2009 14:21:14 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5MELEQU043388; Mon, 22 Jun 2009 14:21:14 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200906221421.n5MELEQU043388@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 22 Jun 2009 14:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194624 - stable/7/sbin/ipfw X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 14:21:15 -0000 Author: luigi Date: Mon Jun 22 14:21:14 2009 New Revision: 194624 URL: http://svn.freebsd.org/changeset/base/194624 Log: MFC: various minor fixes including - use a format string in a printf() - move a variable declaration at the beginning of a block - const-ify strings - fix prototypes Modified: stable/7/sbin/ipfw/altq.c stable/7/sbin/ipfw/dummynet.c stable/7/sbin/ipfw/ipfw2.c stable/7/sbin/ipfw/main.c stable/7/sbin/ipfw/nat.c Modified: stable/7/sbin/ipfw/altq.c ============================================================================== --- stable/7/sbin/ipfw/altq.c Mon Jun 22 13:46:00 2009 (r194623) +++ stable/7/sbin/ipfw/altq.c Mon Jun 22 14:21:14 2009 (r194624) @@ -121,7 +121,7 @@ altq_name_to_qid(const char *name) return altq->qid; } -const char * +static const char * altq_qid_to_name(u_int32_t qid) { struct pf_altq *altq; Modified: stable/7/sbin/ipfw/dummynet.c ============================================================================== --- stable/7/sbin/ipfw/dummynet.c Mon Jun 22 13:46:00 2009 (r194623) +++ stable/7/sbin/ipfw/dummynet.c Mon Jun 22 14:21:14 2009 (r194624) @@ -297,8 +297,6 @@ ipfw_list_pipes(void *data, uint nbytes, sprintf(prefix, "%05d: %s %4d ms ", p->pipe_nr, buf, p->delay); print_flowset_parms(&(p->fs), prefix); - if (co.verbose) - printf(" V %20llu\n", align_uint64(&p->V) >> MY_M); q = (struct dn_flow_queue *)(p+1); list_queues(&(p->fs), q); Modified: stable/7/sbin/ipfw/ipfw2.c ============================================================================== --- stable/7/sbin/ipfw/ipfw2.c Mon Jun 22 13:46:00 2009 (r194623) +++ stable/7/sbin/ipfw/ipfw2.c Mon Jun 22 14:21:14 2009 (r194624) @@ -507,7 +507,7 @@ print_newports(ipfw_insn_u16 *cmd, int p } sep = " "; for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { - printf(sep); + printf("%s", sep); print_port(proto, p[0]); if (p[0] != p[1]) { printf("-"); Modified: stable/7/sbin/ipfw/main.c ============================================================================== --- stable/7/sbin/ipfw/main.c Mon Jun 22 13:46:00 2009 (r194623) +++ stable/7/sbin/ipfw/main.c Mon Jun 22 14:21:14 2009 (r194624) @@ -104,6 +104,7 @@ ipfw_main(int oldac, char **oldav) const char *errstr; char **av, **save_av; int do_acct = 0; /* Show packet/byte count */ + int try_next = 0; #define WHITESP " \t\f\v\n\r" if (oldac < 2) @@ -332,7 +333,6 @@ ipfw_main(int oldac, char **oldav) av[1] = p; } - int try_next = 0; if (co.use_set == 0) { if (_substrcmp(*av, "add") == 0) ipfw_add(ac, av); Modified: stable/7/sbin/ipfw/nat.c ============================================================================== --- stable/7/sbin/ipfw/nat.c Mon Jun 22 13:46:00 2009 (r194623) +++ stable/7/sbin/ipfw/nat.c Mon Jun 22 14:21:14 2009 (r194624) @@ -384,7 +384,7 @@ nospace: } static int -setup_redir_port(char *spool_buf, int len, +setup_redir_port(char *spool_buf, unsigned int len, int *_ac, char ***_av) { char **av, *sep, *protoName; @@ -575,7 +575,7 @@ nospace: } static int -setup_redir_proto(char *spool_buf, int len, +setup_redir_proto(char *spool_buf, unsigned int len, int *_ac, char ***_av) { char **av; @@ -858,8 +858,8 @@ ipfw_config_nat(int ac, char **av) if (!co.do_quiet) { /* After every modification, we show the resultant rule. */ int _ac = 3; - char *_av[] = {"show", "config", id}; - ipfw_show_nat(_ac, _av); + const char *_av[] = {"show", "config", id}; + ipfw_show_nat(_ac, (char **)(void *)_av); } }