From: Romero Malaquias Date: Sun, 13 Dec 2015 21:43:08 +0000 (-0300) Subject: Avoiding conditional directives that break statements X-Git-Tag: tcpdump-4.8.0~64^2 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/759f3de8db3ec94bbbd1ba6038763279536ff735?ds=sidebyside;hp=-c Avoiding conditional directives that break statements --- 759f3de8db3ec94bbbd1ba6038763279536ff735 diff --git a/tcpdump.c b/tcpdump.c index 521196ba..4f42f4b2 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -1888,10 +1888,11 @@ static void compress_savefile(const char *filename) { # ifdef HAVE_FORK - if (fork()) + #define test_fork fork() # else - if (vfork()) + #define test_fork vfork() # endif + if(test_fork) return; /* * Set to lowest priority so that this doesn't disturb the capture