]> The Tcpdump Group git mirrors - tcpdump/commitdiff
execlp() is a varargs function, so if NULL is defined as 0, the compiler
authorGuy Harris <[email protected]>
Tue, 9 Jun 2009 22:05:28 +0000 (15:05 -0700)
committerGuy Harris <[email protected]>
Tue, 9 Jun 2009 22:05:28 +0000 (15:05 -0700)
doesn't know that it needs to be converted to a null pointer constant;
add an explicit cast.

tcpdump.c

index c915ae47c22a8eac015d3b335bf440487e7ead1b..c7515b4d13b3bf74573486e608759f5aa6933f95 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1340,7 +1340,7 @@ compress_savefile(const char *filename)
 #else
        setpriority(PRIO_PROCESS, 0, 19);
 #endif
-       if (execlp(zflag, zflag, filename, NULL) == -1)
+       if (execlp(zflag, zflag, filename, (char *)NULL) == -1)
                fprintf(stderr,
                        "compress_savefile:execlp(%s, %s): %s\n",
                        zflag,