diff options
author | Calvin <calvin.ference@gmail.com> | 2016-08-19 13:43:59 -0400 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-08-22 21:02:20 +0000 |
commit | aba0fe494d0dd7800d116152b27b629dfea273b8 (patch) | |
tree | dd6ca7429702ac710b1ccbc29579b1c0eb87d827 /vnet/vnet/ppp/pg.c | |
parent | a91cbe698281ff339273b1624fb3860ee9c4c2c7 (diff) |
VPP-270: Code style cleanup for vnet/vnet/ppp
Change-Id: I637f1860fedb208d7242dc2798b3d55abac891a3
Signed-off-by: Calvin <calvin.ference@gmail.com>
Diffstat (limited to 'vnet/vnet/ppp/pg.c')
-rw-r--r-- | vnet/vnet/ppp/pg.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/vnet/vnet/ppp/pg.c b/vnet/vnet/ppp/pg.c index 2662bdc1999..0b46ccb9052 100644 --- a/vnet/vnet/ppp/pg.c +++ b/vnet/vnet/ppp/pg.c @@ -41,7 +41,8 @@ #include <vnet/pg/pg.h> #include <vnet/ppp/ppp.h> -typedef struct { +typedef struct +{ pg_edit_t address; pg_edit_t control; pg_edit_t protocol; @@ -58,10 +59,10 @@ pg_ppp_header_init (pg_ppp_header_t * e) uword unformat_pg_ppp_header (unformat_input_t * input, va_list * args) { - pg_stream_t * s = va_arg (*args, pg_stream_t *); - pg_ppp_header_t * h; + pg_stream_t *s = va_arg (*args, pg_stream_t *); + pg_ppp_header_t *h; u32 group_index, error; - + h = pg_create_edit_group (s, sizeof (h[0]), sizeof (ppp_header_t), &group_index); pg_ppp_header_init (h); @@ -70,15 +71,15 @@ unformat_pg_ppp_header (unformat_input_t * input, va_list * args) pg_edit_set_fixed (&h->control, 0x03); error = 1; - if (! unformat (input, "%U", - unformat_pg_edit, - unformat_ppp_protocol_net_byte_order, &h->protocol)) + if (!unformat (input, "%U", + unformat_pg_edit, + unformat_ppp_protocol_net_byte_order, &h->protocol)) goto done; { - ppp_main_t * pm = &ppp_main; - ppp_protocol_info_t * pi = 0; - pg_node_t * pg_node = 0; + ppp_main_t *pm = &ppp_main; + ppp_protocol_info_t *pi = 0; + pg_node_t *pg_node = 0; if (h->protocol.type == PG_EDIT_FIXED) { @@ -92,14 +93,22 @@ unformat_pg_ppp_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: + */ |