Commit c15584e1 authored by Niklas Johansson's avatar Niklas Johansson

Remove shadow warning and improve consistency

Don't shadow already defined variable (data_size).
In addition, we are consistence with the case statement
above.
Signed-off-by: 's avatarNiklas Johansson <niklas.johansson@prevas.dk>
parent a87450eb
...@@ -738,7 +738,7 @@ static MQTTAsync_queuedCommand* MQTTAsync_restoreCommand(char* buffer, int bufle ...@@ -738,7 +738,7 @@ static MQTTAsync_queuedCommand* MQTTAsync_restoreCommand(char* buffer, int bufle
for (i = 0; i < command->details.unsub.count; ++i) for (i = 0; i < command->details.unsub.count; ++i)
{ {
size_t data_size = strlen(ptr) + 1; data_size = strlen(ptr) + 1;
command->details.unsub.topics[i] = malloc(data_size); command->details.unsub.topics[i] = malloc(data_size);
strcpy(command->details.unsub.topics[i], ptr); strcpy(command->details.unsub.topics[i], ptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment