aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/gre/pg.c
diff options
context:
space:
mode:
authorSwarup Nayak <swarupnpvt@gmail.com>2017-11-27 10:27:43 +0530
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-27 19:02:42 +0000
commit9ff647a995ba43dcee898c1904d9ec8298b069c8 (patch)
treeed3c8ff26d2d7c23eba4757bb303a5cacc0a089a /src/vnet/gre/pg.c
parent3919425550dfea28a915858588a7e9fe4094ec0a (diff)
VPP-253 Coding standards cleanup - vnet/vnet/gre
Change-Id: I95f98b91faf74178c05f30da9eb3d6125193b7ef Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
Diffstat (limited to 'src/vnet/gre/pg.c')
-rw-r--r--src/vnet/gre/pg.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/vnet/gre/pg.c b/src/vnet/gre/pg.c
index cc065d3b6b5..38a3a07ebad 100644
--- a/src/vnet/gre/pg.c
+++ b/src/vnet/gre/pg.c
@@ -19,7 +19,8 @@
#include <vnet/pg/pg.h>
#include <vnet/gre/gre.h>
-typedef struct {
+typedef struct
+{
pg_edit_t flags_and_version;
pg_edit_t protocol;
} pg_gre_header_t;
@@ -34,10 +35,10 @@ pg_gre_header_init (pg_gre_header_t * e)
uword
unformat_pg_gre_header (unformat_input_t * input, va_list * args)
{
- pg_stream_t * s = va_arg (*args, pg_stream_t *);
- pg_gre_header_t * h;
+ pg_stream_t *s = va_arg (*args, pg_stream_t *);
+ pg_gre_header_t *h;
u32 group_index, error;
-
+
h = pg_create_edit_group (s, sizeof (h[0]), sizeof (gre_header_t),
&group_index);
pg_gre_header_init (h);
@@ -45,15 +46,15 @@ unformat_pg_gre_header (unformat_input_t * input, va_list * args)
pg_edit_set_fixed (&h->flags_and_version, 0);
error = 1;
- if (! unformat (input, "%U",
- unformat_pg_edit,
- unformat_gre_protocol_net_byte_order, &h->protocol))
+ if (!unformat (input, "%U",
+ unformat_pg_edit,
+ unformat_gre_protocol_net_byte_order, &h->protocol))
goto done;
{
- gre_main_t * pm = &gre_main;
- gre_protocol_info_t * pi = 0;
- pg_node_t * pg_node = 0;
+ gre_main_t *pm = &gre_main;
+ gre_protocol_info_t *pi = 0;
+ pg_node_t *pg_node = 0;
if (h->protocol.type == PG_EDIT_FIXED)
{
@@ -69,9 +70,17 @@ unformat_pg_gre_header (unformat_input_t * input, va_list * args)
}
error = 0;
- done:
+done:
if (error)
pg_free_edit_group (s);
return error == 0;
}
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */