From: rilysh Date: Wed, 6 Dec 2023 05:21:27 +0000 (-0500) Subject: lscpu-cputype.c: assign value to multiple variables (ar->bit32 and ar->bit64) X-Git-Tag: v2.40-rc1~125^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6e4c15b9b4b20b51ae23c5e78f0ee68a895fd34;p=thirdparty%2Futil-linux.git lscpu-cputype.c: assign value to multiple variables (ar->bit32 and ar->bit64) clang with -Wcomma will emit an warning of "misuse of comma operator". Since the value that will be assigned, is the same for both (bit32 and bit64), just assigning directly to both variables seems reasonable. Signed-off-by: rilysh --- diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c index 6111f012ab..5063be43bb 100644 --- a/sys-utils/lscpu-cputype.c +++ b/sys-utils/lscpu-cputype.c @@ -643,11 +643,11 @@ struct lscpu_arch *lscpu_read_architecture(struct lscpu_cxt *cxt) snprintf(buf, sizeof(buf), " %s ", ct->flags); if (strstr(buf, " lm ")) - ar->bit32 = 1, ar->bit64 = 1; /* x86_64 */ + ar->bit32 = ar->bit64 = 1; /* x86_64 */ if (strstr(buf, " zarch ")) - ar->bit32 = 1, ar->bit64 = 1; /* s390x */ + ar->bit32 = ar->bit64 = 1; /* s390x */ if (strstr(buf, " sun4v ") || strstr(buf, " sun4u ")) - ar->bit32 = 1, ar->bit64 = 1; /* sparc64 */ + ar->bit32 = ar->bit64 = 1; /* sparc64 */ } if (ct && ct->isa) {