Skip to content

Commit

Permalink
fixed description and style again.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuoshuguo committed Dec 1, 2016
1 parent c7177dd commit 96ed42e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions sys/include/net/gnrc/netif/hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ uint8_t gnrc_netif_hdr_get_flag(gnrc_pktsnip_t* pkt);
* @param[out] pointer_to_addr pointer to address will be stored here
*
* @return length of destination address
* @return -ENOENT, if there is no destination address field
* @return -ENOENT, if no netif header is presented in @p pkt; or if no
* destination address field presented in netif header.
*/
int gnrc_netif_hdr_get_dstaddr(gnrc_pktsnip_t* pkt, uint8_t** pointer_to_addr);

Expand All @@ -224,7 +225,8 @@ int gnrc_netif_hdr_get_dstaddr(gnrc_pktsnip_t* pkt, uint8_t** pointer_to_addr);
* @param[out] pointer_to_addr pointer to address will be stored here
*
* @return length of source address
* @return -ENOENT, if there is no source address field
* @return -ENOENT, if no netif header is presented in @p pkt; or if no
* source address field presented in netif header.
*/
int gnrc_netif_hdr_get_srcaddr(gnrc_pktsnip_t* pkt, uint8_t** pointer_to_addr);

Expand Down
8 changes: 4 additions & 4 deletions sys/net/gnrc/netif/hdr/gnrc_netif_hdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ int gnrc_netif_hdr_get_dstaddr(gnrc_pktsnip_t* pkt, uint8_t** pointer_to_addr)
if(pkt) {
netif_hdr = pkt->data;
if(netif_hdr) {
if((res = netif_hdr->dst_l2addr_len) <= 0)
if((res = netif_hdr->dst_l2addr_len) <= 0) {
return -ENOENT;

}
*pointer_to_addr = gnrc_netif_hdr_get_dst_addr(netif_hdr);
return res;
}
Expand All @@ -86,9 +86,9 @@ int gnrc_netif_hdr_get_srcaddr(gnrc_pktsnip_t* pkt, uint8_t** pointer_to_addr)
if(pkt) {
netif_hdr = pkt->data;
if(netif_hdr) {
if((res = netif_hdr.src_l2addr_len) <= 0)
if((res = netif_hdr.src_l2addr_len) <= 0) {
return -ENOENT;

}
*pointer_to_addr = gnrc_netif_hdr_get_src_addr(netif_hdr);
return res;
}
Expand Down

0 comments on commit 96ed42e

Please sign in to comment.