]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch "constant in conditional expression" warnings.
authorGuy Harris <[email protected]>
Tue, 20 Mar 2018 20:18:50 +0000 (13:18 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Mar 2018 20:18:50 +0000 (13:18 -0700)
Use for (;;) rather than while (1).

rpcapd/rpcapd.c

index 568218454731725142b5fd75328b5235e9d586d6..d35940819a88bcbcf97fb2f357f6a61861aa6a23 100755 (executable)
@@ -441,7 +441,7 @@ void main_startup(void)
 
        // All the previous calls are no blocking, so the main line of execution goes here
        // and I have to avoid that the program terminates
-       while (1)
+       for (;;)
        {
 #ifdef _WIN32
                Sleep(INFINITE);
@@ -579,7 +579,7 @@ main_passive(void *ptr)
        memset(errbuf, 0, sizeof(errbuf));
 
        // main thread loop
-       while (1)
+       for (;;)
        {
 #ifdef _WIN32
                HANDLE threadId;                // handle for the subthread
@@ -728,7 +728,7 @@ main_active(void *ptr)
                return 0;
        }
 
-       while (1)
+       for (;;)
        {
                int activeclose;