aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2016-08-04 14:25:01 +0100
committerDave Barach <openvpp@barachs.net>2016-08-09 18:33:39 +0000
commitffc7ecace8304217104a5eade163aff5f8903935 (patch)
tree4019b6db329dd7b828712e7f5bf4ec96bc73bf63
parent166a9d4c21821bdbc9a2d5a818ec5ae0e8bdc036 (diff)
Custom adjacency formatting fix
Looks like something strange is going on with indentation. Change-Id: I1522caffa3a8a5e3aa00e1169b7469facc505a8d Signed-off-by: Pierre Pfister <ppfister@cisco.com>
-rw-r--r--vnet/vnet/ip/lookup.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/vnet/vnet/ip/lookup.c b/vnet/vnet/ip/lookup.c
index 8531f645..ebf2ba0c 100644
--- a/vnet/vnet/ip/lookup.c
+++ b/vnet/vnet/ip/lookup.c
@@ -1045,16 +1045,17 @@ u8 * format_ip_adjacency (u8 * s, va_list * args)
ip_adj_register_t *reg;
if (adj->lookup_next_index < vec_len (lm->registered_adjacencies))
+ {
+ reg = vec_elt_at_index(lm->registered_adjacencies,
+ adj->lookup_next_index);
+ if (reg->fn)
{
- reg = vec_elt_at_index(lm->registered_adjacencies,
- adj->lookup_next_index);
- if (reg->fn)
- {
- s = format(s, " %U", reg->fn, lm, adj);
- goto format_done;
- }
+ s = format(s, " ");
+ s = reg->fn(s, lm, adj);
+ goto format_done;
}
-
+ }
+
switch (adj->lookup_next_index)
{
case IP_LOOKUP_NEXT_REWRITE: