From 70a5b9059ea94eab34e1f1ab8f11228cc0b8ed5c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 15 Jul 2013 01:31:32 +0000 Subject: [PATCH 1/1] Fix error checking in wxFileSystemWatcher::Remove() under OS X. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/unix/fswatcher_kqueue.cpp b/src/unix/fswatcher_kqueue.cpp index 5229e5139b..f2de067154 100644 --- a/src/unix/fswatcher_kqueue.cpp +++ b/src/unix/fswatcher_kqueue.cpp @@ -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; -- 2.45.2