From ceafd298f3bae362ae9410f14d62d4bd9122a23f Mon Sep 17 00:00:00 2001 From: toddouska Date: Thu, 12 Jun 2014 15:56:44 -0700 Subject: [PATCH] fix linux crl monitor newer gcc warning --- src/crl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/crl.c b/src/crl.c index 42591b997..bd259ac60 100644 --- a/src/crl.c +++ b/src/crl.c @@ -501,7 +501,7 @@ static int StopMonitor(int mfd) static void* DoMonitor(void* arg) { int notifyFd; - int wd; + int wd = 1; CYASSL_CRL* crl = (CYASSL_CRL*)arg; CYASSL_ENTER("DoMonitor"); @@ -575,7 +575,8 @@ static void* DoMonitor(void* arg) } } - inotify_rm_watch(notifyFd, wd); + if (wd > 0) + inotify_rm_watch(notifyFd, wd); close(crl->mfd); close(notifyFd);