]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
chid-fundamental: rework bit checking to use FLAGS_SET()
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Dec 2024 17:13:16 +0000 (18:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Dec 2024 17:13:16 +0000 (18:13 +0100)
src/fundamental/chid-fundamental.c

index 8a18df3335fccaf814f2bf83ddd044b281726341..b12191b99cdd12f21227666a54497007309e3760 100644 (file)
@@ -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]) {