From ff03702fdebb6c6c55532a6768b404706823c339 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Thu, 9 Jan 2025 02:15:00 -0800 Subject: [PATCH] parser: convert uint to unsigned int As reported in https://gitlab.com/apparmor/apparmor/-/merge_requests/1475 uint requires the inclusion of sys/types.h for use in musl libc. Including that would be fine but since it is only used for the cast for the owner type comparison, just convert to use a more standard type. Reported-by: @fossd Signed-off-by: John Johansen --- parser/rule.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/rule.h b/parser/rule.h index e48089d3b..97e9a149a 100644 --- a/parser/rule.h +++ b/parser/rule.h @@ -252,9 +252,9 @@ public: tmp = (int) rule_mode - (int) rhs.rule_mode; if (tmp != 0) return tmp; - if ((uint) owner < (uint) rhs.owner) + if ((unsigned int) owner < (unsigned int) rhs.owner) return -1; - if ((uint) owner > (uint) rhs.owner) + if ((unsigned int) owner > (unsigned int) rhs.owner) return 1; return 0; }