Skip to content

Commit

Permalink
Fix cut-n-paste error in my_ether_ntoa()
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
  • Loading branch information
troglobit committed Oct 14, 2015
1 parent 85b99e7 commit 8887e89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/suite_single.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ static unsigned char *my_ether_aton(const char *addr)
static char *my_ether_ntoa(unsigned char *addr)
{
static char buf[18];

sprintf(buf, "%02x:%02x:%02x:%02x:%02x:%02x",
addr[0], addr[0], addr[0], addr[0], addr[0], addr[0]);
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);

return buf;
}

static char *my_inet_ntoa(unsigned char *addr)
{
static char buf[18];
static char buf[16];

sprintf(buf, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]);

Expand Down

0 comments on commit 8887e89

Please sign in to comment.