]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: check return value (Coverity 1453456)
authorpaco <paco@voltanet.io>
Mon, 25 Jun 2018 14:10:47 +0000 (16:10 +0200)
committerpaco <paco@voltanet.io>
Mon, 25 Jun 2018 18:20:24 +0000 (20:20 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
lib/libfrr.c

index 505bea9b18fef91858c2b60de579a0449c4de6f2..9ea5e985cd424ab631362335ef33cdb7da5715c6 100644 (file)
@@ -846,7 +846,9 @@ static int frr_daemon_ctl(struct thread *t)
        switch (buf[0]) {
        case 'S': /* SIGTSTP */
                vty_stdio_suspend();
-               send(daemon_ctl_sock, "s", 1, 0);
+               if (send(daemon_ctl_sock, "s", 1, 0) < 0)
+                       zlog_err("%s send(\"s\") error (SIGTSTP propagation)",
+                                (di && di->name ? di->name : ""));
                break;
        case 'R': /* SIGTCNT [implicit] */
                vty_stdio_resume();