Skip to content
Commit d631681e authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Tom Rini
Browse files

cmd/mem.c: use memmove in do_mem_cp()



There's no 'mv' shell command for handling overlapping src and dst
regions, and there's no point introducing one, when we can just make
the existing 'cp' command DTRT in all cases. memmove() should at most
be a few instructions more then memcpy() (to detect the appropriate
direction to do the copy), which is of course completely in the noise
with all the string processing that a shell command does.

Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
parent 22efc1cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment