Skip to content

Commit

Permalink
[IPSEC]: Fix warnings with casting int to pointer
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
herbertx authored and davem330 committed May 22, 2007
1 parent d257905 commit 26b8e51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/xfrm/xfrm_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 26b8e51

Please sign in to comment.