]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix error checking in wxFileSystemWatcher::Remove() under OS X.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 01:31:32 +0000 (01:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 15 Jul 2013 01:31:32 +0000 (01:31 +0000)
The boolean return value was compared with -1 which was always false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/fswatcher_kqueue.cpp

index 5229e5139bd6b4d44a5505b7cb088190ae88dded..f2de067154de0bfad937a0fa217060f489b86b98 100644 (file)
@@ -149,8 +149,7 @@ public:
         // TODO more error conditions according to man
         // XXX closing file descriptor removes the watch. The logic resides in
         // the watch which is not nice, but effective and simple
-        bool ret = watch->Close();
-        if (ret == -1)
+        if ( !watch->Close() )
         {
             wxLogSysError(_("Unable to remove kqueue watch"));
             return false;