]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
coverity: don't fallback to next case for clarity
authorVincent Bernat <bernat@luffy.cx>
Fri, 22 Nov 2013 22:40:57 +0000 (23:40 +0100)
committerVincent Bernat <bernat@luffy.cx>
Fri, 22 Nov 2013 22:40:57 +0000 (23:40 +0100)
Even if the code was correct, add an `_exit(0)` to the first branch and
do not rely on the next case for that.

src/daemon/privsep_io.c

index 638e54584647f98b7e0aad15c0215bdcf0593f71..ae31278c406c16f6fd5da08a03ffb5110f40f404 100644 (file)
@@ -192,8 +192,8 @@ must_read(void *buf, size_t n)
                case -1:
                        if (errno == EINTR || errno == EAGAIN)
                                continue;
-               case 0:
                        _exit(0);
+               case 0: _exit(0);
                default:
                        pos += res;
                }
@@ -214,8 +214,8 @@ must_write(const void *buf, size_t n)
                case -1:
                        if (errno == EINTR || errno == EAGAIN)
                                continue;
-               case 0:
                        _exit(0);
+               case 0: _exit(0);
                default:
                        pos += res;
                }