提交 a99005e0 编写于 作者: 麦壳饼's avatar 麦壳饼

fix for comparison of array 'tsMqttBrokerClientId' equal to a null pointer is

      always false [-Werror,-Wtautological-pointer-compare]
  recnt_status.client_id = tsMqttBrokerClientId==NULL ||
上级 f089b7c4
......@@ -68,7 +68,7 @@ int32_t mqttInitSystem() {
int _tpsize = strlen(topicPath) + strlen(TOPIC) + 1;
recnt_status.topic = calloc(1, _tpsize);
snprintf(recnt_status.topic, _tpsize-1, "/%s/" TOPIC, topicPath);
recnt_status.client_id = tsMqttBrokerClientId==NULL || strlen(tsMqttBrokerClientId)<3? tsMqttBrokerClientId:"taos_mqtt";
recnt_status.client_id = strlen(tsMqttBrokerClientId)<3? tsMqttBrokerClientId:"taos_mqtt";
taos_init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册