diff options
author | KaiGai Kohei <kaigai@kaigai.gr.jp> | 2007-10-03 23:42:56 +0900 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2007-10-17 08:59:36 +1000 |
commit | 087feb980443aadc7c62f6c26d3867543b470d8c (patch) | |
tree | 06922e22b5390aeb2ad9ef8ea64b4f05d1d354e3 /security/selinux/ss/ebitmap.c | |
parent | 9fe79ad1e43d236bbbb8edb3cf634356de714c79 (diff) |
SELinux: kills warnings in Improve SELinux performance when AVC misses
This patch kills ugly warnings when the "Improve SELinux performance
when ACV misses" patch.
Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss/ebitmap.c')
-rw-r--r-- | security/selinux/ss/ebitmap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index ae44c0c9401..c1a6b22d48d 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c @@ -193,7 +193,7 @@ int ebitmap_netlbl_import(struct ebitmap *ebmap, e_sft = delta % EBITMAP_UNIT_SIZE; while (map) { e_iter->maps[e_idx++] |= map & (-1UL); - map >>= EBITMAP_UNIT_SIZE; + map = EBITMAP_SHIFT_UNIT_SIZE(map); } } c_iter = c_iter->next; @@ -389,13 +389,13 @@ int ebitmap_read(struct ebitmap *e, void *fp) if (startbit & (mapunit - 1)) { printk(KERN_ERR "security: ebitmap start bit (%d) is " - "not a multiple of the map unit size (%Zd)\n", + "not a multiple of the map unit size (%u)\n", startbit, mapunit); goto bad; } if (startbit > e->highbit - mapunit) { printk(KERN_ERR "security: ebitmap start bit (%d) is " - "beyond the end of the bitmap (%Zd)\n", + "beyond the end of the bitmap (%u)\n", startbit, (e->highbit - mapunit)); goto bad; } @@ -433,9 +433,8 @@ int ebitmap_read(struct ebitmap *e, void *fp) index = (startbit - n->startbit) / EBITMAP_UNIT_SIZE; while (map) { - n->maps[index] = map & (-1UL); - map = map >> EBITMAP_UNIT_SIZE; - index++; + n->maps[index++] = map & (-1UL); + map = EBITMAP_SHIFT_UNIT_SIZE(map); } } ok: |