X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vnet%2Fvnet%2Fllc%2Fpg.c;h=ad18a4b05c756b1c644ab0c4a24d749c134e5671;hb=c4d1cf76072b54f630b0263cd86e01df82249568;hp=eb6c6a18b270194ad7d76f27c2e5c92dae9f7e54;hpb=cb9cadad578297ffd78fa8a33670bdf1ab669e7e;p=vpp.git diff --git a/vnet/vnet/llc/pg.c b/vnet/vnet/llc/pg.c index eb6c6a18b27..ad18a4b05c7 100644 --- a/vnet/vnet/llc/pg.c +++ b/vnet/vnet/llc/pg.c @@ -41,7 +41,8 @@ #include #include -typedef struct { +typedef struct +{ pg_edit_t dst_sap; pg_edit_t src_sap; pg_edit_t control; @@ -58,10 +59,10 @@ pg_llc_header_init (pg_llc_header_t * e) uword unformat_pg_llc_header (unformat_input_t * input, va_list * args) { - pg_stream_t * s = va_arg (*args, pg_stream_t *); - pg_llc_header_t * h; + pg_stream_t *s = va_arg (*args, pg_stream_t *); + pg_llc_header_t *h; u32 group_index, error; - + h = pg_create_edit_group (s, sizeof (h[0]), sizeof (llc_header_t), &group_index); pg_llc_header_init (h); @@ -69,15 +70,15 @@ unformat_pg_llc_header (unformat_input_t * input, va_list * args) pg_edit_set_fixed (&h->control, 0x03); error = 1; - if (! unformat (input, "%U -> %U", - unformat_pg_edit, - unformat_llc_protocol, &h->src_sap, &h->dst_sap)) + if (!unformat (input, "%U -> %U", + unformat_pg_edit, + unformat_llc_protocol, &h->src_sap, &h->dst_sap)) goto done; { - llc_main_t * pm = &llc_main; - llc_protocol_info_t * pi = 0; - pg_node_t * pg_node = 0; + llc_main_t *pm = &llc_main; + llc_protocol_info_t *pi = 0; + pg_node_t *pg_node = 0; if (h->dst_sap.type == PG_EDIT_FIXED) { @@ -91,14 +92,22 @@ unformat_pg_llc_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: + */