diff options
author | Eric Paris <eparis@redhat.com> | 2012-04-04 19:46:46 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-04-09 18:22:57 +0200 |
commit | 92ae9e82d9a2c4b9b388d6a9e7a4b2ccb0b4452f (patch) | |
tree | c9fb517b25ff64f1a07abf62fa90512a48949fc4 /include | |
parent | SELinux: possible NULL deref in context_struct_to_string (diff) | |
download | linux-92ae9e82d9a2c4b9b388d6a9e7a4b2ccb0b4452f.tar.xz linux-92ae9e82d9a2c4b9b388d6a9e7a4b2ccb0b4452f.zip |
SELinux: remove needless sel_div function
I'm not really sure what the idea behind the sel_div function is, but it's
useless. Since a and b are both unsigned, it's impossible for a % b < 0.
That means that part of the function never does anything. Thus it's just a
normal /. Just do that instead. I don't even understand what that operation
was supposed to mean in the signed case however....
If it was signed:
sel_div(-2, 4) == ((-2 / 4) - ((-2 % 4) < 0))
((0) - ((-2) < 0))
((0) - (1))
(-1)
What actually happens:
sel_div(-2, 4) == ((18446744073709551614 / 4) - ((18446744073709551614 % 4) < 0))
((4611686018427387903) - ((2 < 0))
(4611686018427387903 - 0)
((unsigned int)4611686018427387903)
(4294967295)
Neither makes a whole ton of sense to me. So I'm getting rid of the
function entirely.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions