Observed issue using clang on GNU/Linux:
bridging/common/pluginServer.cpp:211:14:\
error: comparison of array 'ctx->reconnect_file_name' \
not equal to a null pointer is always true \
[-Werror,-Wtautological-pointer-compare]
if (ctx->reconnect_file_name != NULL)
Change-Id: Ifc5e40ba8d7943ca648e93627ed77cbc25f2731a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18369
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
(cherry picked from commit
995c584afef7af741d32fc024366d245fa2cf1ca)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19129
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
OIC_LOG_V(ERROR, TAG, "Error (%d) initializing OCF infrastructure", result);
goto HandleError;
}
- if (ctx->reconnect_file_name != NULL)
+ if ('\0' != ctx->reconnect_file_name[0])
{
strncpy(g_plugin_context->reconnect_file_name, ctx->reconnect_file_name,
strlen(ctx->reconnect_file_name));
plugindetails->clientId,
plugindetails->lightNo, plugindetails->prefix);
- if ((plugindetails->bridgeMac != NULL) && ( plugindetails->clientId != NULL))
+ if (('\0' != plugindetails->bridgeMac[0]) && ('\0' != plugindetails->clientId[0]))
{
if (authorizedBridges.find(plugindetails->bridgeMac) == authorizedBridges.end())
{