]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/simple/Pipe.cc: silence cppcheck warning about reassign before use
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 23 Sep 2015 11:35:52 +0000 (13:35 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 29 Jan 2016 20:51:17 +0000 (21:51 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/msg/simple/Pipe.cc

index ace77aa298f3d73bf79ac8f235f49d86a1c7abb4..89c8b8f24cd2ef669b39a03b522f040a16a6e7a6 100644 (file)
@@ -1717,9 +1717,8 @@ void Pipe::writer()
       state_closed.set(1);
       pipe_lock.Unlock();
       if (sd) {
-       int r = ::write(sd, &tag, 1);
-       // we can ignore r, actually; we don't care if this succeeds.
-       r++; r = 0; // placate gcc
+       // we can ignore return value, actually; we don't care if this succeeds.
+       if(::write(sd, &tag, 1));
       }
       pipe_lock.Lock();
       continue;