examples/asymcute_mqttsn: do normal assignment instead of memcpy
This commit is contained in:
parent
b21399b25c
commit
01a170bf0e
@ -128,7 +128,7 @@ static int _topic_find(asymcute_topic_t *t, const char *name)
|
|||||||
if (asymcute_topic_is_reg(&_topics[i]) &&
|
if (asymcute_topic_is_reg(&_topics[i]) &&
|
||||||
(strncmp(name, _topics[i].name, sizeof(_topics[i].name)) == 0)) {
|
(strncmp(name, _topics[i].name, sizeof(_topics[i].name)) == 0)) {
|
||||||
if (t) {
|
if (t) {
|
||||||
memcpy(t, &_topics[i], sizeof(asymcute_topic_t));
|
*t = _topics[i];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user