summaryrefslogtreecommitdiffstats
path: root/src/vnet/hdlc/pg.c
diff options
context:
space:
mode:
authorSwarup Nayak <swarupnpvt@gmail.com>2017-11-22 16:41:57 +0530
committerChris Luke <chris_luke@comcast.com>2017-11-22 21:45:34 +0000
commitcc42db82f8d7e8e3e6719b1ae98bf3d48fff4b02 (patch)
tree13cca4b97f71c7e7ce188d4da6f4d60ea14cccda /src/vnet/hdlc/pg.c
parenteb2945cf6ffa35c3b22c2fa0c85bc67c9c39045a (diff)
VPP-254 Coding standard cleanup - vnet/vnet/hdlc
Change-Id: I125b1ca20a5b30d199d4a79ad0034533818a5e9c Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
Diffstat (limited to 'src/vnet/hdlc/pg.c')
-rw-r--r--src/vnet/hdlc/pg.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/vnet/hdlc/pg.c b/src/vnet/hdlc/pg.c
index b8e67022b08..408e1876a6a 100644
--- a/src/vnet/hdlc/pg.c
+++ b/src/vnet/hdlc/pg.c
@@ -41,7 +41,8 @@
#include <vnet/pg/pg.h>
#include <vnet/hdlc/hdlc.h>
-typedef struct {
+typedef struct
+{
pg_edit_t address;
pg_edit_t control;
pg_edit_t protocol;
@@ -58,10 +59,10 @@ pg_hdlc_header_init (pg_hdlc_header_t * e)
uword
unformat_pg_hdlc_header (unformat_input_t * input, va_list * args)
{
- pg_stream_t * s = va_arg (*args, pg_stream_t *);
- pg_hdlc_header_t * h;
+ pg_stream_t *s = va_arg (*args, pg_stream_t *);
+ pg_hdlc_header_t *h;
u32 group_index, error;
-
+
h = pg_create_edit_group (s, sizeof (h[0]), sizeof (hdlc_header_t),
&group_index);
pg_hdlc_header_init (h);
@@ -70,15 +71,15 @@ unformat_pg_hdlc_header (unformat_input_t * input, va_list * args)
pg_edit_set_fixed (&h->control, 0x00);
error = 1;
- if (! unformat (input, "%U",
- unformat_pg_edit,
- unformat_hdlc_protocol_net_byte_order, &h->protocol))
+ if (!unformat (input, "%U",
+ unformat_pg_edit,
+ unformat_hdlc_protocol_net_byte_order, &h->protocol))
goto done;
{
- hdlc_main_t * pm = &hdlc_main;
- hdlc_protocol_info_t * pi = 0;
- pg_node_t * pg_node = 0;
+ hdlc_main_t *pm = &hdlc_main;
+ hdlc_protocol_info_t *pi = 0;
+ pg_node_t *pg_node = 0;
if (h->protocol.type == PG_EDIT_FIXED)
{
@@ -92,14 +93,22 @@ unformat_pg_hdlc_header (unformat_input_t * input, va_list * args)
&& unformat_user (input, pg_node->unformat_edit, s))
;
- else if (! unformat_user (input, unformat_pg_payload, s))
+ else if (!unformat_user (input, unformat_pg_payload, s))
goto done;
}
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:
+ */