mirror of https://github.com/eclipse/paho.mqtt.c
Merge branch 'fix-redundant-null-checks' of https://github.com/tbeu/paho.mqtt.c into develop
This commit is contained in:
commit
6f93f2d2a6
|
|
@ -2996,8 +2996,7 @@ static int MQTTAsync_disconnect1(MQTTAsync handle, const MQTTAsync_disconnectOpt
|
|||
dis->command.details.dis.timeout = options->timeout;
|
||||
if (m->c->MQTTVersion >= MQTTVERSION_5 && options->struct_version >= 1)
|
||||
{
|
||||
if (options != NULL)
|
||||
dis->command.properties = MQTTProperties_copy(&options->properties);
|
||||
dis->command.properties = MQTTProperties_copy(&options->properties);
|
||||
dis->command.details.dis.reasonCode = options->reasonCode;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ void* TreeRemoveNodeIndex(Tree* aTree, Node* curnode, int index)
|
|||
{
|
||||
Node temp;
|
||||
memset(&temp, '\0', sizeof(Node));
|
||||
temp.parent = (redundant) ? redundant->parent : NULL;
|
||||
temp.parent = redundant->parent;
|
||||
temp.red = 0;
|
||||
TreeBalanceAfterRemove(aTree, &temp, index);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue