Skip to contentSkip to conversation

selinux: Use 1UL for EBITMAP_BIT to match maps type

PATCH In review Canfeng Guo 2 participants 2 messages Jun 29, 2024 – Jul 2, 2024 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selinux: Use 1UL for EBITMAP_BIT to match maps type

This patch modifies the definition of EBITMAP_BIT in security/selinux/ss/ebitmap.h from 1ULL to 1UL to match the type of elements in the ebitmap_node maps array.

This change does not affect the functionality or correctness of the code but aims to enhance code quality by adhering to good programming practices and avoiding unnecessary type conversions.

---
 security/selinux/ss/ebitmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/ss/ebitmap.h +1 -1
index 24d7d8b3cda3..ba2ac3da1153 100644
@@ -29,7 +29,7 @@
 	 sizeof(unsigned long))
 #define EBITMAP_UNIT_SIZE BITS_PER_LONG
 #define EBITMAP_SIZE	  (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE)
-#define EBITMAP_BIT	  1ULL
+#define EBITMAP_BIT	  1UL
 #define EBITMAP_SHIFT_UNIT_SIZE(x) \
 	(((x) >> EBITMAP_UNIT_SIZE / 2) >> EBITMAP_UNIT_SIZE / 2)
 
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 5 lines · On Jun 29, 2024 Canfeng Guo <[email protected]> wrote:

This patch modifies the definition of EBITMAP_BIT in security/selinux/ss/ebitmap.h from 1ULL to 1UL to match the type of elements in the ebitmap_node maps array.

Quoted 8 lines

This change does not affect the functionality or correctness of the code but aims to enhance code quality by adhering to good programming practices and avoiding unnecessary type conversions.

---
 security/selinux/ss/ebitmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, this looks good to me, and it's trivial enough that I think it is safe to merge at this point in the release cycle; merged to selinux/dev.

--
paul-moore.com