From 49e87905cff1da6cd4b299d97ce7d5c2cf516610 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sat, 24 Dec 2011 09:56:45 -0500 Subject: [PATCH] Fix compiler warnings --- src/modules/rlm_policy/evaluate.c | 18 +++++++++--------- src/modules/rlm_policy/parse.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/rlm_policy/evaluate.c b/src/modules/rlm_policy/evaluate.c index 3c1a000..69650ef 100644 --- a/src/modules/rlm_policy/evaluate.c +++ b/src/modules/rlm_policy/evaluate.c @@ -348,23 +348,23 @@ static int policy_stack_push(policy_state_t *state, const policy_item_t *item) /* * Pop an item from the state. */ -static int policy_stack_pop(policy_state_t *state, const policy_item_t **pitem) +static int policy_stack_pop(policy_state_t *state, const policy_item_t **item) { - rad_assert(pitem != NULL); + rad_assert(item != NULL); rad_assert(state->depth >= 0); redo: if (state->depth == 0) { - *pitem = NULL; + *item = NULL; return 0; } - *pitem = state->stack[state->depth - 1]; + *item = state->stack[state->depth - 1]; /* * Named policies are on the stack for catching recursion. */ - if ((*pitem)->type == POLICY_TYPE_NAMED_POLICY) { + if ((*item)->type == POLICY_TYPE_NAMED_POLICY) { state->depth--; goto redo; } @@ -372,12 +372,12 @@ static int policy_stack_pop(policy_state_t *state, const policy_item_t **pitem) /* * Process the whole item list. */ - if ((*pitem)->next) { - state->stack[state->depth - 1] = (*pitem)->next; - debug_evaluate("pop/push %d %p\n", state->depth - 1, *pitem); + if ((*item)->next) { + state->stack[state->depth - 1] = (*item)->next; + debug_evaluate("pop/push %d %p\n", state->depth - 1, *item); } else { state->depth--; /* points to unused entry */ - debug_evaluate("pop %d %p\n", state->depth, *pitem); + debug_evaluate("pop %d %p\n", state->depth, *item); } return 1; diff --git a/src/modules/rlm_policy/parse.c b/src/modules/rlm_policy/parse.c index 71a7eb6..99376c7 100644 --- a/src/modules/rlm_policy/parse.c +++ b/src/modules/rlm_policy/parse.c @@ -1532,7 +1532,7 @@ static int parse_named_policy(policy_lex_file_t *lexer) } if ((lexer->debug & POLICY_DEBUG_PRINT_POLICY) != 0) { - rlm_policy_print(this); + rlm_policy_print((policy_item_t *) this); } return 1; -- 2.1.4