aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-05-12 19:08:24 +0200
committerDamjan Marion <damarion@cisco.com>2016-05-12 19:06:59 +0000
commitb0618bdc8447f5ed85cba8423db6024062166099 (patch)
tree0f0b9f92456a6888c5a0b194c894c8c029d31073
parent0e0c99f8def7c426f1ef8884b9da29d9fdce6e0a (diff)
VPP-53: clang build fails in API on SR tests
Change-Id: Ib3117d7b5b6b8c97acfea17ad27c965f6ce2e829 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--vpp/api/api.c2
-rw-r--r--vpp/api/custom_dump.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c
index c1f7fef6e47..4809a6e5318 100644
--- a/vpp/api/api.c
+++ b/vpp/api/api.c
@@ -3454,7 +3454,7 @@ static void vl_api_sr_policy_add_del_t_handler
goto out;
}
- if (!(mp->tunnel_names))
+ if (!(mp->tunnel_names[0]))
{
rv = VNET_API_ERROR_NO_SUCH_NODE2;
goto out;
diff --git a/vpp/api/custom_dump.c b/vpp/api/custom_dump.c
index d0d77f6877e..f77a41cc93f 100644
--- a/vpp/api/custom_dump.c
+++ b/vpp/api/custom_dump.c
@@ -1014,7 +1014,7 @@ static void *vl_api_sr_tunnel_add_del_t_print
s = format (0, "SCRIPT: sr_tunnel_add_del ");
- if (mp->name)
+ if (mp->name[0])
s = format (s, "name %s ", mp->name);
s = format (s, "src %U dst %U/%d ", format_ip6_address,
@@ -1065,7 +1065,7 @@ static void *vl_api_sr_tunnel_add_del_t_print
}
}
- if (mp->policy_name)
+ if (mp->policy_name[0])
s = format (s, "policy_name %s ", mp->policy_name);
if (mp->is_add == 0)
@@ -1082,11 +1082,11 @@ static void *vl_api_sr_policy_add_del_t_print
s = format (0, "SCRIPT: sr_policy_add_del ");
- if (mp->name)
+ if (mp->name[0])
s = format (s, "name %s ", mp->name);
- if (mp->tunnel_names)
+ if (mp->tunnel_names[0])
{
// start deserializing tunnel_names
int num_tunnels = mp->tunnel_names[0]; //number of tunnels
@@ -1110,7 +1110,7 @@ static void *vl_api_sr_policy_add_del_t_print
if (mp->is_add == 0)
s = format (s, "del ");
-
+
FINISH;
}
@@ -1123,16 +1123,16 @@ static void *vl_api_sr_multicast_map_add_del_t_print
s = format (0, "SCRIPT: sr_multicast_map_add_del ");
- if (mp->multicast_address)
- s = format (s, "address %U ", format_ip6_address, &mp->multicast_address);
+ if (mp->multicast_address[0])
+ s = format (s, "address %U ", format_ip6_address, &mp->multicast_address);
- if (mp->policy_name)
+ if (mp->policy_name[0])
s = format (s, "sr-policy %s ", &mp->policy_name);
- if (mp->is_add == 0)
+ if (mp->is_add == 0)
s = format (s, "del ");
-
+
FINISH;
}