]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/selinux/ss/ebitmap.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / security / selinux / ss / ebitmap.c
index 920b5e36a1af97c00ea6294370a4717651a738aa..68c7348d1acc6628f4c6121207edc34f6a7f707a 100644 (file)
@@ -109,7 +109,7 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap,
        *catmap = c_iter;
        c_iter->startbit = e_iter->startbit & ~(NETLBL_CATMAP_SIZE - 1);
 
-       while (e_iter != NULL) {
+       while (e_iter) {
                for (i = 0; i < EBITMAP_UNIT_NUMS; i++) {
                        unsigned int delta, e_startbit, c_endbit;
 
@@ -197,7 +197,7 @@ int ebitmap_netlbl_import(struct ebitmap *ebmap,
                        }
                }
                c_iter = c_iter->next;
-       } while (c_iter != NULL);
+       } while (c_iter);
        if (e_iter != NULL)
                ebmap->highbit = e_iter->startbit + EBITMAP_SIZE;
        else
@@ -364,7 +364,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
        count = le32_to_cpu(buf[2]);
 
        if (mapunit != sizeof(u64) * 8) {
-               printk(KERN_ERR "security: ebitmap: map size %u does not "
+               printk(KERN_ERR "SELinux: ebitmap: map size %u does not "
                       "match my size %Zd (high bit was %d)\n",
                       mapunit, sizeof(u64) * 8, e->highbit);
                goto bad;
@@ -382,19 +382,19 @@ int ebitmap_read(struct ebitmap *e, void *fp)
        for (i = 0; i < count; i++) {
                rc = next_entry(&startbit, fp, sizeof(u32));
                if (rc < 0) {
-                       printk(KERN_ERR "security: ebitmap: truncated map\n");
+                       printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
                        goto bad;
                }
                startbit = le32_to_cpu(startbit);
 
                if (startbit & (mapunit - 1)) {
-                       printk(KERN_ERR "security: ebitmap start bit (%d) is "
+                       printk(KERN_ERR "SELinux: ebitmap start bit (%d) is "
                               "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 "
+                       printk(KERN_ERR "SELinux: ebitmap start bit (%d) is "
                               "beyond the end of the bitmap (%u)\n",
                               startbit, (e->highbit - mapunit));
                        goto bad;
@@ -405,20 +405,19 @@ int ebitmap_read(struct ebitmap *e, void *fp)
                        tmp = kzalloc(sizeof(*tmp), GFP_KERNEL);
                        if (!tmp) {
                                printk(KERN_ERR
-                                      "security: ebitmap: out of memory\n");
+                                      "SELinux: ebitmap: out of memory\n");
                                rc = -ENOMEM;
                                goto bad;
                        }
                        /* round down */
                        tmp->startbit = startbit - (startbit % EBITMAP_SIZE);
-                       if (n) {
+                       if (n)
                                n->next = tmp;
-                       } else {
+                       else
                                e->node = tmp;
-                       }
                        n = tmp;
                } else if (startbit <= n->startbit) {
-                       printk(KERN_ERR "security: ebitmap: start bit %d"
+                       printk(KERN_ERR "SELinux: ebitmap: start bit %d"
                               " comes after start bit %d\n",
                               startbit, n->startbit);
                        goto bad;
@@ -426,7 +425,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
 
                rc = next_entry(&map, fp, sizeof(u64));
                if (rc < 0) {
-                       printk(KERN_ERR "security: ebitmap: truncated map\n");
+                       printk(KERN_ERR "SELinux: ebitmap: truncated map\n");
                        goto bad;
                }
                map = le64_to_cpu(map);