fix for comparison of array 'tsMqttBrokerClientId' equal to a null pointer is
always false [-Werror,-Wtautological-pointer-compare] recnt_status.client_id = tsMqttBrokerClientId==NULL ||
This commit is contained in:
parent
f089b7c411
commit
a99005e0e8
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue