From nobody Mon Feb 26 23:17:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkGjM4YYHz5Bt6b; Mon, 26 Feb 2024 23:17:11 +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 4TkGjM44Tzz4T4p; Mon, 26 Feb 2024 23:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708989431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qs1Zwhh2D9uFZXFrJVkTCjCZEXLODPDjgZa9pOfiXM=; b=Taru1yzHScxYRnjl7GXZtyGEaFdzihpZ3rrkip/3W9M0InolZuKtkX+P2ADMFVWAVAjusz j00XXQyZXRyFsVvVxZEaLwFkkjF7IOWgvqhPoVXRqeVAixF/zmY8L50KupJvbjpaPYnUsx l0VXTXvF8vTMV78S0IJxDacesID5jAuv/HWQqdGY85U+HK2Y4Y7ceAD3fvie5xNISqedv3 0PiOEN7G/eVSDua8zxIrNz1prjsXJ8nstBczauzZnvcJO/7tW6B+bPr6AKCrC5q1RYE6AC C2hjRfZEogaVAYOG7AeRd4Nlf7rIrxwGAVHWUvIYwnnAT3YWmeByGdnAXSAfSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708989431; a=rsa-sha256; cv=none; b=ymiC7zRSr3MIuGUr8VCC/EEBjO+auo1mo2LE0lEJadS8AxrwZtbek923pQrgAJ7J0VaT09 eftMVW2bb856QkM3cVRowpLOaSGm4pUC4a3vvit5UbU1o3v1/M1a+33atri1Elkob9I4/u vSZfgye2j7E5KjL8AUUj6qXexNEyjb8AyniBz//38ophAGZ292PntIIIyfI9rH2ciL71tu Pd89+8FpD9Ii/0j579YEAUOWpkoPOIUuTIuKUAhJIsTVK4tq/q6uRincqMMdb2OplOvuS7 oAhk36e/XA4Cfhho9UCi8CKfIkRdGiRzYe4d2IntvrOobTSmLzkGV99Ds2cwWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708989431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qs1Zwhh2D9uFZXFrJVkTCjCZEXLODPDjgZa9pOfiXM=; b=pd58VZvEZGxg+mwl/rhzTaE9jMktJjCyffF3adh2zRNZkqwCtv4HvQi8Qw1/1Xzi7kW3MZ przfjq1Tzr6RW2+FfhJEJ7yHUxqAwXPKcYPga8t/NqyWwM1/emsZQASJo4kCRGDsCUAIGz fWfg5rBOx+z4ynlHzY5Y/ZqIcAsbvk1BFDhfpAVzb1s1FEDNONfiQqihmIBT4hSRmOcEOh VVdhnwSmT2iKT+21d8ilTVxgA+lJJZgyrM5xAxIyCzZl6bJumDEHRIhKvFHyLT4V3MSErR 047PnbPm/p4nqy/BzfjuIhtZeoqhh3LUKYTTt2V2LhjDpdSliXaWAcowY+6s3g== 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 4TkGjM33GLznS6; Mon, 26 Feb 2024 23:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41QNHB8Z012264; Mon, 26 Feb 2024 23:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QNHBZa012261; Mon, 26 Feb 2024 23:17:11 GMT (envelope-from git) Date: Mon, 26 Feb 2024 23:17:11 GMT Message-Id: <202402262317.41QNHBZa012261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bc4c7e78f845 - main - ofwdump: Convert ints that are booleans to bool. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 commit bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 Author: Warner Losh AuthorDate: 2024-02-26 23:14:53 +0000 Commit: Warner Losh CommitDate: 2024-02-26 23:15:55 +0000 ofwdump: Convert ints that are booleans to bool. No functional changes... Sponsored by: Netflix --- usr.sbin/ofwdump/ofwdump.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/usr.sbin/ofwdump/ofwdump.c b/usr.sbin/ofwdump/ofwdump.c index f2bcad8b7c1f..335ae38afa5d 100644 --- a/usr.sbin/ofwdump/ofwdump.c +++ b/usr.sbin/ofwdump/ofwdump.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -47,10 +48,10 @@ static void usage(void); static void ofw_indent(int); -static void ofw_dump_properties(int, phandle_t, int, int, int); +static void ofw_dump_properties(int, phandle_t, int, bool, bool); static void ofw_dump_property(int fd, phandle_t n, int level, - const char *prop, int raw, int str); -static void ofw_dump(int, const char *, int, int, const char *, int, int); + const char *prop, bool raw, bool str); +static void ofw_dump(int, const char *, bool, bool, const char *, bool, bool); static void usage(void) @@ -66,42 +67,42 @@ int main(int argc, char *argv[]) { int opt, i, fd; - int aflag, pflag, rflag, Rflag, Sflag; + bool aflag, pflag, rflag, Rflag, Sflag; char *Parg; - aflag = pflag = rflag = Rflag = Sflag = 0; + aflag = pflag = rflag = Rflag = Sflag = false; Parg = NULL; while ((opt = getopt(argc, argv, "-aprP:RS")) != -1) { if (opt == '-') break; switch (opt) { case 'a': - aflag = 1; - rflag = 1; + aflag = true; + rflag = true; break; case 'p': if (Parg != NULL) usage(); - pflag = 1; + pflag = true; break; case 'r': - rflag = 1; + rflag = true; break; case 'P': if (pflag) usage(); - pflag = 1; + pflag = true; Parg = optarg; break; case 'R': if (Sflag) usage(); - Rflag = 1; + Rflag = true; break; case 'S': if (Rflag) usage(); - Sflag = 1; + Sflag = true; break; case '?': default: @@ -139,7 +140,7 @@ ofw_indent(int level) } static void -ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) +ofw_dump_properties(int fd, phandle_t n, int level, bool raw, bool str) { int nlen; char prop[OFIOCSUGGPROPNAMELEN]; @@ -150,8 +151,8 @@ ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) } static void -ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, - int str) +ofw_dump_property(int fd, phandle_t n, int level, const char *prop, bool raw, + bool str) { static void *pbuf = NULL; static char *visbuf = NULL; @@ -207,7 +208,7 @@ ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, static void ofw_dump_node(int fd, phandle_t n, int level, int rec, int prop, - const char *pmatch, int raw, int str) + const char *pmatch, bool raw, bool str) { static void *nbuf = NULL; static int nblen = 0; @@ -238,8 +239,8 @@ ofw_dump_node(int fd, phandle_t n, int level, int rec, int prop, } static void -ofw_dump(int fd, const char *start, int rec, int prop, const char *pmatch, - int raw, int str) +ofw_dump(int fd, const char *start, bool rec, bool prop, const char *pmatch, + bool raw, bool str) { phandle_t n;