All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] xen/flask: Rename cond_expr.bool to bool_val
@ 2016-07-14 15:58 Andrew Cooper
  2016-07-14 15:58 ` [PATCH 2/2] xen/build: Use C99 booleans Andrew Cooper
  2016-07-14 18:01 ` [PATCH 1/2] xen/flask: Rename cond_expr.bool to bool_val Daniel De Graaf
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Cooper @ 2016-07-14 15:58 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Daniel De Graaf

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>
---
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/xsm/flask/ss/conditional.c | 6 +++---
 xen/xsm/flask/ss/conditional.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/xen/xsm/flask/ss/conditional.c b/xen/xsm/flask/ss/conditional.c
index 098ddc0..3e58aea 100644
--- a/xen/xsm/flask/ss/conditional.c
+++ b/xen/xsm/flask/ss/conditional.c
@@ -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) )
         {
diff --git a/xen/xsm/flask/ss/conditional.h b/xen/xsm/flask/ss/conditional.h
index d389ecf..59ac6b4 100644
--- a/xen/xsm/flask/ss/conditional.h
+++ b/xen/xsm/flask/ss/conditional.h
@@ -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;
 };
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-01 10:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-14 15:58 [PATCH 1/2] xen/flask: Rename cond_expr.bool to bool_val Andrew Cooper
2016-07-14 15:58 ` [PATCH 2/2] xen/build: Use C99 booleans Andrew Cooper
2016-07-14 16:12   ` Julien Grall
2016-07-14 16:26     ` Andrew Cooper
2016-07-14 16:49   ` Tim Deegan
2016-08-01 10:29   ` Jan Beulich
2016-08-01 10:33     ` Andrew Cooper
2016-07-14 18:01 ` [PATCH 1/2] xen/flask: Rename cond_expr.bool to bool_val Daniel De Graaf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.