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
[ Upstream commit e123134b39dc40af94e8aec49227ae55b5e087a8 ]

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]>
[ Backport from v6.11 ]
Signed-off-by: WangYuli <[email protected]>
  • Loading branch information
Canfeng Guo authored and Avenger-285714 committed Oct 7, 2024
1 parent 186b97f commit 7beae96
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 @@ -27,7 +27,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 7beae96

Please sign in to comment.