summaryrefslogtreecommitdiffstats
path: root/src/vnet/gre/pg.c
diff options
context:
space:
mode:
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:
+ */