[trivial PATCH 19/22] [rlm_policy.c] eliminate build warnings

Wang Tinggong wangtinggong at gmail.com
Mon Feb 1 18:31:47 CET 2010


Signed-off-by: Wang Tinggong <wangtinggong at gmail.com>
---
 src/modules/rlm_policy/rlm_policy.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/modules/rlm_policy/rlm_policy.c b/src/modules/rlm_policy/rlm_policy.c
index 3c848d6..0a13b5e 100644
--- a/src/modules/rlm_policy/rlm_policy.c
+++ b/src/modules/rlm_policy/rlm_policy.c
@@ -205,8 +205,10 @@ static int policy_send_coa(void *instance, REQUEST *request)
 /*
  *	The "free" functions are here, for no particular reason.
  */
-void rlm_policy_free_item(policy_item_t *item)
+void rlm_policy_free_item(void *it)
 {
+	policy_item_t *item = (policy_item_t*)it;
+
 	while (item) {
 		policy_item_t *next = item->next;
 
@@ -302,7 +304,7 @@ void rlm_policy_free_item(policy_item_t *item)
 			}
 			break;
 		} /* switch over type */
-		item->next = NULL; /* for debugging & sanity checks */
+		((policy_item_t*)item)->next = NULL; /* for debugging & sanity checks */
 		item->type = POLICY_TYPE_BAD;
 		free(item);
 
-- 
1.6.0.6



More information about the Freeradius-Devel mailing list