From: Lennart Poettering Date: Fri, 20 Dec 2024 17:13:16 +0000 (+0100) Subject: chid-fundamental: rework bit checking to use FLAGS_SET() X-Git-Tag: v258-rc1~1796^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a04af8516e684e2652877c4259188f01be7fe9bb;p=thirdparty%2Fsystemd.git chid-fundamental: rework bit checking to use FLAGS_SET() --- diff --git a/src/fundamental/chid-fundamental.c b/src/fundamental/chid-fundamental.c index 8a18df3335f..b12191b99cd 100644 --- a/src/fundamental/chid-fundamental.c +++ b/src/fundamental/chid-fundamental.c @@ -43,7 +43,7 @@ static void get_chid( sha1_process_bytes(&namespace, sizeof(namespace), &ctx); for (ChidSmbiosFields i = 0; i < _CHID_SMBIOS_FIELDS_MAX; i++) { - if (!((mask >> i) & 1)) + if (!FLAGS_SET(mask, UINT32_C(1) << i)) continue; if (!smbios_fields[i]) {