From owner-dev-commits-src-branches@freebsd.org Wed Sep 8 12:03:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75794679C7A; Wed, 8 Sep 2021 12:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H4LPc6hkvz3DKY; Wed, 8 Sep 2021 12:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A21D525730; Wed, 8 Sep 2021 12:03:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 188C3GP2012577; Wed, 8 Sep 2021 12:03:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 188C3GNM012576; Wed, 8 Sep 2021 12:03:16 GMT (envelope-from git) Date: Wed, 8 Sep 2021 12:03:16 GMT Message-Id: <202109081203.188C3GNM012576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 0c976ab9c086 - stable/13 - pfctl: Don't use PRIu64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c976ab9c086e1a4765533c869fd6ad60140da68 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 12:03:17 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c976ab9c086e1a4765533c869fd6ad60140da68 commit 0c976ab9c086e1a4765533c869fd6ad60140da68 Author: Kristof Provost AuthorDate: 2021-09-01 16:18:26 +0000 Commit: Kristof Provost CommitDate: 2021-09-08 07:28:25 +0000 pfctl: Don't use PRIu64 Rather than PRIu64 we can just treat the data as uintmax_t, and use %jx instead. MFC after: 1 week Suggested by: kib Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 795d78a46713fc16153966e77f20da2f40aac2a3) --- sbin/pfctl/pfctl_parser.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 9f955a8b1c96..04c3bf76bfd8 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pfctl_parser.h" @@ -576,9 +575,9 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) (unsigned long long)s->pcounters[1][1][PF_DROP]); } printf("%-27s %14s %16s\n", "State Table", "Total", "Rate"); - printf(" %-25s %14" PRIu64 " %14s\n", "current entries", s->states, ""); + printf(" %-25s %14jx %14s\n", "current entries", s->states, ""); TAILQ_FOREACH(c, &s->fcounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -587,10 +586,10 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } if (opts & PF_OPT_VERBOSE) { printf("Source Tracking Table\n"); - printf(" %-25s %14" PRIu64 " %14s\n", "current entries", + printf(" %-25s %14jx %14s\n", "current entries", s->src_nodes, ""); TAILQ_FOREACH(c, &s->scounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -600,7 +599,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) } printf("Counters\n"); TAILQ_FOREACH(c, &s->counters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime); @@ -610,7 +609,7 @@ print_status(struct pfctl_status *s, struct pfctl_syncookies *cookies, int opts) if (opts & PF_OPT_VERBOSE) { printf("Limit Counters\n"); TAILQ_FOREACH(c, &s->lcounters, entry) { - printf(" %-25s %14" PRIu64 " ", c->name, c->counter); + printf(" %-25s %14jx ", c->name, c->counter); if (runtime > 0) printf("%14.1f/s\n", (double)c->counter / (double)runtime);