From c6e4c15b9b4b20b51ae23c5e78f0ee68a895fd34 Mon Sep 17 00:00:00 2001 From: rilysh Date: Wed, 6 Dec 2023 00:21:27 -0500 Subject: [PATCH] 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 --- sys-utils/lscpu-cputype.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.47.2