xen/flask: Rename cond_expr.bool to bool_val
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 14 Jul 2016 15:34:52 +0000 (16:34 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jul 2016 09:52:34 +0000 (10:52 +0100)
A subsequent change will introduce C99 bools, at which point 'bool'
becomes a type, and ineligible as a variable name.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
xen/xsm/flask/ss/conditional.c
xen/xsm/flask/ss/conditional.h

index 098ddc027d85788d9f5b09839a89f56fbd3f4542..3e58aea5514780e2b7630c738745f7ca16db73d4 100644 (file)
@@ -40,7 +40,7 @@ static int cond_evaluate_expr(struct policydb *p, struct cond_expr *expr)
                 if ( sp == (COND_EXPR_MAXDEPTH - 1) )
                     return -1;
                 sp++;
-                s[sp] = p->bool_val_to_struct[cur->bool - 1]->state;
+                s[sp] = p->bool_val_to_struct[cur->bool_val - 1]->state;
             break;
             case COND_NOT:
                 if ( sp < 0 )
@@ -404,7 +404,7 @@ static int expr_isvalid(struct policydb *p, struct cond_expr *expr)
         return 0;
     }
 
-    if ( expr->bool > p->p_bools.nprim )
+    if ( expr->bool_val > p->p_bools.nprim )
     {
         printk("Flask: conditional expressions uses unknown bool.\n");
         return 0;
@@ -444,7 +444,7 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp)
             goto err;
 
         expr->expr_type = le32_to_cpu(buf[0]);
-        expr->bool = le32_to_cpu(buf[1]);
+        expr->bool_val = le32_to_cpu(buf[1]);
 
         if ( !expr_isvalid(p, expr) )
         {
index d389ecf8704eba39fbc97e69bb2e42b2a00f7784..59ac6b4b57c1e01ff4d9523b25b90ae550a77695 100644 (file)
@@ -30,7 +30,7 @@ struct cond_expr {
 #define COND_NEQ    7 /* bool != bool */
 #define COND_LAST    COND_NEQ
     __u32 expr_type;
-    __u32 bool;
+    __u32 bool_val;
     struct cond_expr *next;
 };