Skip to content

Commit

Permalink
selinux: Use 1UL for EBITMAP_BIT to match maps type
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Canfeng Guo <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
Canfeng Guo authored and pcmoore committed Jul 2, 2024
1 parent 1613e60 commit e123134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/ebitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e123134

Please sign in to comment.