diff --git a/ping.cpp b/ping.cpp index 11ef1ae..79db52f 100644 --- a/ping.cpp +++ b/ping.cpp @@ -168,11 +168,8 @@ static void ping_recv(int s) { // Register end time gettimeofday(&end, NULL); - /// Get from IP address - ip4_addr_t fromaddr; - inet_addr_to_ip4addr(&fromaddr, &from.sin_addr); - - strcpy(ipa, inet_ntoa(fromaddr)); + // Get from IP address + strcpy(ipa, inet_ntoa(from.sin_addr)); // Get echo iphdr = (struct ip_hdr *)buf;