Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jun 2018 21:19:08 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335608 - head/sbin/pfctl
Message-ID:  <201806242119.w5OLJ8MZ089590@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Sun Jun 24 21:19:08 2018
New Revision: 335608
URL: https://svnweb.freebsd.org/changeset/base/335608

Log:
  Assuming that the intent (from the white space) is that the fprintf()
  be executed in the if() conditional.  If its not supposed to be printed
  inside the conditional, then the braces should be removed and the extra
  tabs on the fprintf() should be removed.
  
  Noted by cross compilation with gcc-mips.

Modified:
  head/sbin/pfctl/pfctl_altq.c

Modified: head/sbin/pfctl/pfctl_altq.c
==============================================================================
--- head/sbin/pfctl/pfctl_altq.c	Sun Jun 24 19:29:29 2018	(r335607)
+++ head/sbin/pfctl/pfctl_altq.c	Sun Jun 24 21:19:08 2018	(r335608)
@@ -497,12 +497,13 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq 
 		 * this causes integer overflow in kernel!
 		 * (bandwidth < 6Kbps when max_pkt_size=1500)
 		 */
-		if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0)
+		if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) {
 			warnx("queue bandwidth must be larger than %s",
 			    rate2str(ifnsPerByte * (double)opts->maxpktsize /
 			    (double)INT_MAX * (double)pa->ifbandwidth));
 			fprintf(stderr, "cbq: queue %s is too slow!\n",
 			    pa->qname);
+		}
 		nsPerByte = (double)(INT_MAX / opts->maxpktsize);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806242119.w5OLJ8MZ089590>