Merge 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 <fossdd@pwned.life>
Signed-off-by: John Johansen <john.johansen@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1478
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
John Johansen 2025-01-09 10:40:27 +00:00
commit cd8b75abc0

View file

@ -252,9 +252,9 @@ public:
tmp = (int) rule_mode - (int) rhs.rule_mode; tmp = (int) rule_mode - (int) rhs.rule_mode;
if (tmp != 0) if (tmp != 0)
return tmp; return tmp;
if ((uint) owner < (uint) rhs.owner) if ((unsigned int) owner < (unsigned int) rhs.owner)
return -1; return -1;
if ((uint) owner > (uint) rhs.owner) if ((unsigned int) owner > (unsigned int) rhs.owner)
return 1; return 1;
return 0; return 0;
} }