
28 May
2019
28 May
'19
4:07 a.m.
On 5/28/19 4:06 AM, Tom Rini wrote:
On Tue, May 28, 2019 at 03:49:13AM +0200, Marek Vasut wrote:
If the source and destination buffer address is identical, there is no need to memcpy() the content. Skip the memcpy() in such a case.
Signed-off-by: Marek Vasut marex@denx.de Cc: Michal Simek michal.simek@xilinx.com Cc: Tom Rini trini@konsulko.com
Shouldn't memcpy catch that itself?
memcpy(3) says The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas must not overlap. Use memmove(3) if the memory areas do overlap.
--
Best regards,
Marek Vasut