bridging: Return false boolean instead of enum
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 28 Jun 2017 02:54:05 +0000 (04:54 +0200)
committerTodd Malsbary <todd.malsbary@intel.com>
Fri, 30 Jun 2017 23:07:56 +0000 (23:07 +0000)
Small Fix to support g++-7.1.0

It was tested on yocto poky master on iotivity-1.3.0 (and later):

  bridging/plugins/nest_plugin/nest_objects/nest.cpp: \
  In member function 'bool Nest::isAuthorized()':
  bridging/plugins/nest_plugin/nest_objects/nest.cpp:95:16: \
  error: enum constant in boolean context [-Werror=int-in-bool-context]

Change-Id: Ib53aa7be0198cd926b6901b173001910a324633e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21071
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
bridging/plugins/nest_plugin/nest_objects/nest.cpp

index 780d6e9..8b40848 100644 (file)
@@ -92,7 +92,7 @@ bool Nest::isAuthorized()
     if (curlCode != MPM_RESULT_OK)
     {
         OIC_LOG_V(ERROR, TAG, "Curl GET Request operation failed. Error code %d", curlCode);
-        return MPM_RESULT_INTERNAL_ERROR;
+        return false;
     }
 
     if (MPM_RESULT_OK != parseStructureJsonResponse(response, m_metaInfo))