X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlibapi%2Fapi_helper_macros.h;h=3a011dae2b602962d800c6c96423aa1371377a3d;hb=e63325e3ca03c847963863446345e6c80a2c0cfd;hp=1245db82dd049bd3b6f1ec616dc2bf507d7cbc09;hpb=d465631c3c97b4eb387b4b2dd851e301dc09e007;p=vpp.git diff --git a/src/vlibapi/api_helper_macros.h b/src/vlibapi/api_helper_macros.h index 1245db82dd0..3a011dae2b6 100644 --- a/src/vlibapi/api_helper_macros.h +++ b/src/vlibapi/api_helper_macros.h @@ -94,7 +94,7 @@ do { \ if (!rmp) \ return; \ \ - memset (rmp, 0, sizeof (*rmp)); \ + clib_memset (rmp, 0, sizeof (*rmp)); \ rv = VNET_API_ERROR_TABLE_TOO_BIG; \ is_error = 1; \ } \ @@ -115,7 +115,7 @@ vnet_sw_if_index_is_api_valid (u32 sw_if_index) } #define VALIDATE_SW_IF_INDEX(mp) \ - do { u32 __sw_if_index = ntohl(mp->sw_if_index); \ + do { u32 __sw_if_index = ntohl((mp)->sw_if_index); \ if (!vnet_sw_if_index_is_api_valid(__sw_if_index)) { \ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ goto bad_sw_if_index; \ @@ -129,7 +129,7 @@ bad_sw_if_index: \ } while (0); #define VALIDATE_RX_SW_IF_INDEX(mp) \ - do { u32 __rx_sw_if_index = ntohl(mp->rx_sw_if_index); \ + do { u32 __rx_sw_if_index = ntohl((mp)->rx_sw_if_index); \ if (!vnet_sw_if_index_is_api_valid(__rx_sw_if_index)) { \ rv = VNET_API_ERROR_INVALID_SW_IF_INDEX; \ goto bad_rx_sw_if_index; \ @@ -183,7 +183,7 @@ static void vl_api_want_##lca##_t_handler ( \ p = hash_get (vam->lca##_registration_hash, mp->client_index); \ if (p) { \ if (mp->enable_disable) { \ - clib_warning ("pid %d: already enabled...", mp->pid); \ + clib_warning ("pid %d: already enabled...", ntohl(mp->pid)); \ rv = VNET_API_ERROR_INVALID_REGISTRATION; \ goto reply; \ } else { \ @@ -238,7 +238,8 @@ _(bfd_events) \ _(wc_ip6_nd_events) \ _(wc_ip4_arp_events) \ _(ip6_ra_events) \ -_(dhcp6_pd_reply_events) +_(dhcp6_pd_reply_events) \ +_(dhcp6_reply_events) typedef struct {