Replace memmove by memcpy
This commit is contained in:
@@ -622,7 +622,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
)
|
||||
{ // start entering a DTMF string
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
memmove(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1));
|
||||
memcpy(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1));
|
||||
gDTMF_InputBox_Index = 0;
|
||||
gDTMF_InputMode = true;
|
||||
|
||||
|
@@ -681,7 +681,7 @@ void MENU_AcceptSetting(void)
|
||||
GUI_SelectNextDisplay(DISPLAY_MAIN);
|
||||
gDTMF_InputMode = true;
|
||||
gDTMF_InputBox_Index = 3;
|
||||
memmove(gDTMF_InputBox, gDTMF_ID, 4);
|
||||
memcpy(gDTMF_InputBox, gDTMF_ID, 4);
|
||||
gRequestDisplayScreen = DISPLAY_INVALID;
|
||||
}
|
||||
return;
|
||||
@@ -1436,7 +1436,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
edit_index = 0; // 'edit_index' is going to be used as the cursor position
|
||||
|
||||
// make a copy so we can test for change when exiting the menu item
|
||||
memmove(edit_original, edit, sizeof(edit_original));
|
||||
memcpy(edit_original, edit, sizeof(edit_original));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -487,11 +487,11 @@ bool UART_IsCommandAvailable(void)
|
||||
if (TailIndex < Index)
|
||||
{
|
||||
const uint16_t ChunkSize = sizeof(UART_DMA_Buffer) - Index;
|
||||
memmove(UART_Command.Buffer, UART_DMA_Buffer + Index, ChunkSize);
|
||||
memmove(UART_Command.Buffer + ChunkSize, UART_DMA_Buffer, TailIndex);
|
||||
memcpy(UART_Command.Buffer, UART_DMA_Buffer + Index, ChunkSize);
|
||||
memcpy(UART_Command.Buffer + ChunkSize, UART_DMA_Buffer, TailIndex);
|
||||
}
|
||||
else
|
||||
memmove(UART_Command.Buffer, UART_DMA_Buffer + Index, TailIndex - Index);
|
||||
memcpy(UART_Command.Buffer, UART_DMA_Buffer + Index, TailIndex - Index);
|
||||
|
||||
TailIndex = DMA_INDEX(TailIndex, 2);
|
||||
if (TailIndex < gUART_WriteIndex)
|
||||
|
Reference in New Issue
Block a user