]> git.tue.mpg.de Git - paraslash.git/commitdiff
server: Kill an unused variable.
authorAndre Noll <maan@systemlinux.org>
Wed, 10 Aug 2011 22:06:20 +0000 (00:06 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 17 Sep 2011 16:49:43 +0000 (18:49 +0200)
In status_refresh(), ret is set to 1 and never changed. Remove this
variable and get rid of the check which is always true.

server.c

index 142e2abb4c982457e2b51b250207e4eedeb77605..5fec70b63517f352386d0990cb9b7e797a2429dc 100644 (file)
--- a/server.c
+++ b/server.c
@@ -525,7 +525,7 @@ static void server_init(int argc, char **argv)
 static void status_refresh(void)
 {
        static int prev_uptime = -1, prev_events = -1;
-       int uptime = server_uptime(UPTIME_GET), ret = 1;
+       int uptime = server_uptime(UPTIME_GET);
 
        if (prev_events != mmd->events)
                goto out;
@@ -540,11 +540,8 @@ out:
        prev_uptime = uptime;
        prev_events = mmd->events;
        mmd->vss_status_flags = mmd->new_vss_status_flags;
-       if (ret) {
-               PARA_DEBUG_LOG("%d events, forcing status update\n",
-                       mmd->events);
-               killpg(0, SIGUSR1);
-       }
+       PARA_DEBUG_LOG("%d events, forcing status update\n", mmd->events);
+       killpg(0, SIGUSR1);
 }
 
 static int server_select(int max_fileno, fd_set *readfds, fd_set *writefds,