diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-02-13 21:40:20 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-02-13 21:52:56 +0100 |
commit | 9173be30c4716ce6c1a4c9b73a3657bb8fc3327a (patch) | |
tree | b04be2fc88c30b2bdd27aa2cdaa3e2e949f244ae /src | |
parent | c6a4bdb9ea086ba48b000777f35090559f86c962 (diff) | |
download | conntrack-tools-9173be30c4716ce6c1a4c9b73a3657bb8fc3327a.tar.gz conntrack-tools-9173be30c4716ce6c1a4c9b73a3657bb8fc3327a.zip |
sync: don't override initial return value of local handler
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/sync-mode.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 96379f6..1250a08 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -465,29 +465,25 @@ static int local_handler_sync(int fd, int type, void *data) switch(type) { case DUMP_INTERNAL: - ret = fork_process_new(CTD_PROC_ANY, 0, NULL, NULL); - if (ret == 0) { + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE(mode)->internal->dump(fd, NFCT_O_PLAIN); exit(EXIT_SUCCESS); } break; case DUMP_EXTERNAL: - ret = fork_process_new(CTD_PROC_ANY, 0, NULL, NULL); - if (ret == 0) { + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE_SYNC(external)->dump(fd, NFCT_O_PLAIN); exit(EXIT_SUCCESS); } break; case DUMP_INT_XML: - ret = fork_process_new(CTD_PROC_ANY, 0, NULL, NULL); - if (ret == 0) { + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE(mode)->internal->dump(fd, NFCT_O_XML); exit(EXIT_SUCCESS); } break; case DUMP_EXT_XML: - ret = fork_process_new(CTD_PROC_ANY, 0, NULL, NULL); - if (ret == 0) { + if (fork_process_new(CTD_PROC_ANY, 0, NULL, NULL) == 0) { STATE_SYNC(external)->dump(fd, NFCT_O_XML); exit(EXIT_SUCCESS); } |