From: Steven Barth Date: Sun, 13 Apr 2014 16:33:39 +0000 (+0200) Subject: Fix building with newer toolchains X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6661ec505820cfb1a02b788641c2e770cbd38e36;p=oweals%2Ffirewall3.git Fix building with newer toolchains Signed-off-by: Steven Barth --- diff --git a/main.c b/main.c index bf0830b..bc1cfd7 100644 --- a/main.c +++ b/main.c @@ -479,7 +479,7 @@ int main(int argc, char **argv) break; case 'q': - freopen("/dev/null", "w", stderr); + if (freopen("/dev/null", "w", stderr)) {} break; case 'h': @@ -514,7 +514,7 @@ int main(int argc, char **argv) #endif } - freopen("/dev/null", "w", stderr); + if (freopen("/dev/null", "w", stderr)) {}; cfg_state->disable_ipsets = true; print_family = family; diff --git a/utils.c b/utils.c index 7e5ae45..8ed52be 100644 --- a/utils.c +++ b/utils.c @@ -697,7 +697,7 @@ fw3_hotplug(bool add, void *zone, void *device) close(0); close(1); close(2); - chdir("/"); + if (chdir("/")) {}; clearenv(); setenv("ACTION", add ? "add" : "remove", 1);