[PATCH v2 1/1] netlabel: cleanup struct netlbl_lsm_catmap
Paul Moore
paul at paul-moore.com
Sun Feb 4 15:00:27 UTC 2024
On Sat, Feb 3, 2024 at 9:35 PM George Guo <dongtai.guo at linux.dev> wrote:
>
> From: George Guo <guodongtai at kylinos.cn>
>
> Simplify the code from macro NETLBL_CATMAP_MAPTYPE to u64, and fix
> warning "Macros with complex values should be enclosed in parentheses"
> on "#define NETLBL_CATMAP_BIT (NETLBL_CATMAP_MAPTYPE)0x01", which is
> modified to "#define NETLBL_CATMAP_BIT ((u64)0x01)".
>
> Signed-off-by: George Guo <guodongtai at kylinos.cn>
> ---
> V2:
> Yes, I understand what you are saying.
> Actually, there is a compile warnings on "#define NETLBL_CATMAP_BIT (NETLBL_CATMAP_MAPTYPE)0x01"
> which is missing parentheses.
> ---
> include/net/netlabel.h | 7 +++----
> net/netlabel/netlabel_kapi.c | 8 ++++----
> 2 files changed, 7 insertions(+), 8 deletions(-)
This is a much better approach, thank you.
Acked-by: Paul Moore <paul at paul-moore.com>
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list