From 26b8e51e98ae09cfc770b918577c004a376de4b8 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Tue, 22 May 2007 16:12:26 -0700 Subject: [PATCH] [IPSEC]: Fix warnings with casting int to pointer This patch adds some casts to shut up the warnings introduced by my last patch that added a common interator function for xfrm algorightms. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- net/xfrm/xfrm_algo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index 8a72def25a34..5ced62c19c63 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -407,27 +407,27 @@ static struct xfrm_algo_desc *xfrm_find_algo( static int xfrm_alg_id_match(const struct xfrm_algo_desc *entry, const void *data) { - return entry->desc.sadb_alg_id == (int)data; + return entry->desc.sadb_alg_id == (unsigned long)data; } struct xfrm_algo_desc *xfrm_aalg_get_byid(int alg_id) { return xfrm_find_algo(&xfrm_aalg_list, xfrm_alg_id_match, - (void *)alg_id, 1); + (void *)(unsigned long)alg_id, 1); } EXPORT_SYMBOL_GPL(xfrm_aalg_get_byid); struct xfrm_algo_desc *xfrm_ealg_get_byid(int alg_id) { return xfrm_find_algo(&xfrm_ealg_list, xfrm_alg_id_match, - (void *)alg_id, 1); + (void *)(unsigned long)alg_id, 1); } EXPORT_SYMBOL_GPL(xfrm_ealg_get_byid); struct xfrm_algo_desc *xfrm_calg_get_byid(int alg_id) { return xfrm_find_algo(&xfrm_calg_list, xfrm_alg_id_match, - (void *)alg_id, 1); + (void *)(unsigned long)alg_id, 1); } EXPORT_SYMBOL_GPL(xfrm_calg_get_byid); -- 2.20.1