Skip to content

Commit

Permalink
Fixing IP address assignment macro
Browse files Browse the repository at this point in the history
  • Loading branch information
asynclabs committed Sep 1, 2009
1 parent abae909 commit 3cf237b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uip.h
Expand Up @@ -871,8 +871,8 @@ struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport);
* \hideinitializer
*/
#define uip_ipaddr(addr, addr0,addr1,addr2,addr3) do { \
((u16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1)); \
((u16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3)); \
((u16_t *)(addr))[0] = HTONS(((addr0) << 8) | (addr1 & 0x00ff)); \
((u16_t *)(addr))[1] = HTONS(((addr2) << 8) | (addr3 & 0x00ff)); \
} while(0)

/**
Expand Down

0 comments on commit 3cf237b

Please sign in to comment.