We don't need the pidfile_created variable, just jump to another label. Reported by clang-3.4.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- src/iptraf.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/iptraf.c b/src/iptraf.c index 2dc1759..0178147 100644 --- a/src/iptraf.c +++ b/src/iptraf.c @@ -427,9 +427,7 @@ int main(int argc, char **argv)
if (create_pidfile() < 0) - goto cleanup; - - int pidfile_created = 1; + goto bailout;
/* * If a facility is directly invoked from the command line, check for @@ -537,8 +535,7 @@ int main(int argc, char **argv) endwin();
cleanup: - if (pidfile_created) - unlink(IPTRAF_PIDFILE); - + unlink(IPTRAF_PIDFILE); +bailout: return 0; }