src/handler/lib/policy.c
/**
 * Pops a node the stack. If the node is in HASH mode, computes the hash.
 * Returns 0 on success, -1 on error.
 */
Pops a node the stack. If the node is in HASH mode, computes the hash.
Returns 0 on success, -1 on error.
Pops a node the stack . If the node is in HASH mode computes the hash . Returns 0 on success - 1 on error .
static int state_stack_pop(policy_parser_state_t *state) {
    policy_parser_node_state_t *node = &state->nodes[state->node_stack_eos];
    if (state->node_stack_eos >= MAX_POLICY_DEPTH || state->node_stack_eos <= -1) {
        return -1;
    }
    if (node->mode == MODE_OUT_HASH) {
        crypto_hash_digest(&state->hash_context.header, state->hash, 32);
    }
    --state->node_stack_eos;
    return 0;
}
static int state_stack_pop ( policy_parser_state_t * state ) { policy_parser_node_state_t * node = & state -> nodes [ state -> node_stack_eos ] ; if ( state -> node_stack_eos >= MAX_POLICY_DEPTH || state -> node_stack_eos <= -1 ) { return -1 ; } if ( node -> mode == MODE_OUT_HASH ) { crypto_hash_digest ( & state -> hash_context . header , state -> hash , 32 ) ; } -- state -> node_stack_eos ; return 0 ; }
Pops a node the stack.
Pops a node the stack .