fix: condition loop

This commit is contained in:
2025-11-19 09:14:20 -06:00
parent 3a3b4279ad
commit d902a4b48a

View File

@ -223,9 +223,9 @@ int main(int ac, char **av)
}
gettimeofday(&stop, NULL);
}
while (!(ret == 1 && buffer[0] == '\0') || (len == packet_size && packet_check(buffer, packet_size) == 0 && packet_compare(packet, buffer, packet_size) == 0));
while ((ret > 1) && (len != packet_size && packet_check(buffer, packet_size) && packet_compare(packet, buffer, packet_size)));
if (*buffer != 0)
if (ret > 1)
{
stats.packets_received++;
print_recv(&settings, (struct icmphdr *)buffer, &start, &stop);