Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2020 09:02:43 +0000 (UTC)
From:      =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r365030 - head/sbin/ipfw
Message-ID:  <202009010902.08192hge064881@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Sep  1 09:02:43 2020
New Revision: 365030
URL: https://svnweb.freebsd.org/changeset/base/365030

Log:
  Change printf format string to include the extra blank
  
  This is a follow up change to r364321 after a discussion about the style.
  All near by places use extra blanks in format strings, and while use of the
  format string to provide the extra blank may need more cycles than adding 1
  to twidth, it generates shorter code and is clearer in the opinion of some
  reviewers of the previous change.
  
  Not objected to by:	emaste
  MFC after:		3 days

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Tue Sep  1 08:14:46 2020	(r365029)
+++ head/sbin/ipfw/ipfw2.c	Tue Sep  1 09:02:43 2020	(r365030)
@@ -2199,7 +2199,7 @@ show_static_rule(struct cmdline_opts *co, struct forma
 			*strchr(timestr, '\n') = '\0';
 			bprintf(bp, "%s ", timestr);
 		} else {
-			bprintf(bp, "%*s", twidth + 1, " ");
+			bprintf(bp, "%*s ", twidth, "");
 		}
 	}
 



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