resource: Don't log error of oc_mutex_free 41/21141/3
authorWay Vadhanasin <wayvad@microsoft.com>
Fri, 28 Apr 2017 16:35:57 +0000 (09:35 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Wed, 12 Jul 2017 16:23:26 +0000 (16:23 +0000)
IOT-2177 Don't log error if oc_mutex_free is called with null.

Change-Id: I1e589304f9bce866f5ba18800292204c78d43590
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19433
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 36525788ca27c32354accc504f6dcc5875e1c902)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21141

resource/c_common/octhread/src/posix/octhread.c
resource/c_common/octhread/src/windows/octhread.c

index c87ee80..587f9c9 100644 (file)
@@ -286,10 +286,6 @@ bool oc_mutex_free(oc_mutex mutex)
             OIC_LOG_V(ERROR, TAG, "%s Failed to free mutex !", __func__);
         }
     }
-    else
-    {
-        OIC_LOG_V(ERROR, TAG, "%s Invalid mutex !", __func__);
-    }
 
     return bRet;
 }
index cef1b06..36e7987 100644 (file)
@@ -165,11 +165,7 @@ bool oc_mutex_free(oc_mutex mutex)
     {
         DeleteCriticalSection(&mutexInfo->mutex);
         OICFree(mutexInfo);
-        bRet=true;
-    }
-    else
-    {
-        OIC_LOG_V(ERROR, TAG, "%s Invalid mutex !", __func__);
+        bRet = true;
     }
 
     return bRet;