From e6250e0a7ff77d421f9d9b01357520cca14288d5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 11 May 2016 12:13:47 +0200 Subject: ONE-9: Fix clang build errors Change-Id: Icbf3e269471ee0fc1d21f842b2ea220328a0f891 Signed-off-by: Florin Coras --- vnet/vnet/lisp-cp/lisp_types.c | 4 ++-- vnet/vnet/lisp-gpe/lisp_gpe.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'vnet') diff --git a/vnet/vnet/lisp-cp/lisp_types.c b/vnet/vnet/lisp-cp/lisp_types.c index c9f44059..b38871c2 100644 --- a/vnet/vnet/lisp-cp/lisp_types.c +++ b/vnet/vnet/lisp-cp/lisp_types.c @@ -563,7 +563,7 @@ lcaf_write (u8 * p, void * a) size += sizeof (h[0]); len = (*lcaf_write_fcts[type])(p + size, lcaf); - if (~0 == len) + if ((u16)~0 == len) return ~0; return size + len; @@ -579,7 +579,7 @@ vni_write (u8 * p, void * a) size += sizeof (u32); len = gid_address_put (p + size, vni_gid (v)); - if (~0 == len) + if ((u16)~0 == len) return ~0; return size + len; diff --git a/vnet/vnet/lisp-gpe/lisp_gpe.c b/vnet/vnet/lisp-gpe/lisp_gpe.c index b7906cdb..c09b322b 100644 --- a/vnet/vnet/lisp-gpe/lisp_gpe.c +++ b/vnet/vnet/lisp-gpe/lisp_gpe.c @@ -198,8 +198,8 @@ add_del_negative_fwd_entry (lisp_gpe_main_t * lgm, /* TODO insert tunnel that always sends map-request */ case DROP: /* for drop fwd entries, just add route, no need to add encap tunnel */ - adj.lookup_next_index = ip_prefix_version(dpref) == IP4 ? - LGPE_IP4_LOOKUP_NEXT_DROP : LGPE_IP6_LOOKUP_NEXT_DROP; + adj.lookup_next_index = (u32) (ip_prefix_version(dpref) == IP4 ? + LGPE_IP4_LOOKUP_NEXT_DROP : LGPE_IP6_LOOKUP_NEXT_DROP); /* add/delete route for prefix */ return ip_sd_fib_add_del_route (lgm, dpref, spref, a->table_id, &adj, -- cgit 1.2.3-korg