]> git.lyx.org Git - features.git/commitdiff
Fix wrong test: boolean variable is never negative
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 1 Nov 2014 15:02:34 +0000 (16:02 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 1 Nov 2014 15:06:08 +0000 (16:06 +0100)
This has been spotted by clang++.

src/Server.cpp

index 1de758a5f46bd1b9507c9e2ad9b213d9a015c550..b7fa35ee13fbeee11d1a8676a73f6f31fada827c 100644 (file)
@@ -878,7 +878,7 @@ void LyXComm::endPipe(int & fd, string const & filename, bool write)
                       << '\n' << strerror(errno) << endl;
        }
 
-       if (FileName(filename).removeFile() < 0) {
+       if (!FileName(filename).removeFile()) {
                lyxerr << "LyXComm: Could not remove pipe " << filename
                       << '\n' << strerror(errno) << endl;
        }