From add5a8be6708cafc1bf065f7629e82fdf5707dab Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 10 Mar 2016 11:33:40 +0100 Subject: [PATCH] Code style --- core/net/ipv6/uip-icmp6.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/net/ipv6/uip-icmp6.c b/core/net/ipv6/uip-icmp6.c index 05f18a026..157ed0edb 100644 --- a/core/net/ipv6/uip-icmp6.c +++ b/core/net/ipv6/uip-icmp6.c @@ -206,15 +206,14 @@ echo_request_input(void) /*---------------------------------------------------------------------------*/ void uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param) { - - /* check if originating packet is not an ICMP error*/ - if (uip_ext_len) { - if(UIP_EXT_BUF->next == UIP_PROTO_ICMP6 && UIP_ICMP_BUF->type < 128){ + /* check if originating packet is not an ICMP error */ + if(uip_ext_len) { + if(UIP_EXT_BUF->next == UIP_PROTO_ICMP6 && UIP_ICMP_BUF->type < 128) { uip_clear_buf(); return; } } else { - if(UIP_IP_BUF->proto == UIP_PROTO_ICMP6 && UIP_ICMP_BUF->type < 128){ + if(UIP_IP_BUF->proto == UIP_PROTO_ICMP6 && UIP_ICMP_BUF->type < 128) { uip_clear_buf(); return; } @@ -231,8 +230,9 @@ uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param) { uip_len += UIP_IPICMPH_LEN + UIP_ICMP6_ERROR_LEN; - if(uip_len > UIP_LINK_MTU) + if(uip_len > UIP_LINK_MTU) { uip_len = UIP_LINK_MTU; + } memmove((uint8_t *)UIP_ICMP6_ERROR_BUF + uip_ext_len + UIP_ICMP6_ERROR_LEN, (void *)UIP_IP_BUF, uip_len - UIP_IPICMPH_LEN - uip_ext_len - UIP_ICMP6_ERROR_LEN);