Skip to content
Commit c3fae2b2 authored by Christian Göttsche's avatar Christian Göttsche Committed by Paul Moore
Browse files

selinux: use int arrays for boolean values



Do not cast pointers of signed integers to pointers of unsigned integers
and vice versa.

It should currently not be an issue since they hold SELinux boolean
values which should only contain either 0's or 1's, which should have
the same representation.

Reported by sparse:

  .../selinuxfs.c:1485:30: warning: incorrect type in assignment
                                    (different signedness)
  .../selinuxfs.c:1485:30:    expected unsigned int *
  .../selinuxfs.c:1485:30:    got int *[addressable] values
  .../selinuxfs.c:1402:48: warning: incorrect type in argument 3
                                    (different signedness)
  .../selinuxfs.c:1402:48:    expected int *values
  .../selinuxfs.c:1402:48:    got unsigned int *bool_pending_values

Signed-off-by: default avatarChristian Göttsche <cgzones@googlemail.com>
[PM: minor whitespace fixes, sparse output cleanup]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 5698f081
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment