mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
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>
(cherry picked from commit cd8b75abc0
)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user