mmu: Use strncpy when possible

Since tmp is always null-terminated we can save some time compared to a
memcpy call.
This commit is contained in:
Yuri D'Elia 2022-12-13 12:41:43 +01:00 committed by DRracer
parent b3b9778341
commit 9f3f0baa47
1 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,7 @@ void ProtocolLogic::LogRequestMsg(const uint8_t *txbuff, uint8_t size) {
} else {
MMU2_ECHO_MSGLN(tmp);
}
memcpy(lastMsg, tmp, rqs);
strncpy(lastMsg, tmp, rqs);
}
void ProtocolLogic::LogError(const char *reason_P) {