Lines Matching refs:expr
20 * cond_evaluate_expr evaluates a conditional expr
25 static int cond_evaluate_expr(struct policydb *p, struct cond_expr *expr)
32 for (cur = expr; cur; cur = cur->next) {
94 new_state = cond_evaluate_expr(p, node->expr);
146 for (cur_expr = node->expr; cur_expr; cur_expr = next_expr) {
380 static int expr_isvalid(struct policydb *p, struct cond_expr *expr)
382 if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) {
387 if (expr->bool > p->p_bools.nprim) {
399 struct cond_expr *expr = NULL, *last = NULL;
412 /* expr */
421 expr = kzalloc(sizeof(struct cond_expr), GFP_KERNEL);
422 if (!expr)
425 expr->expr_type = le32_to_cpu(buf[0]);
426 expr->bool = le32_to_cpu(buf[1]);
428 if (!expr_isvalid(p, expr)) {
430 kfree(expr);
435 node->expr = expr;
437 last->next = expr;
438 last = expr;