[U-Boot] [PATCH] memmove_wd: Allow overlapping memory area
Wolfgang Denk
wd at denx.de
Mon Aug 9 00:18:19 CEST 2010
Dear Alexander Stein,
In message <1279701826-20083-1-git-send-email-alexander.stein at systec-electronic.com> you wrote:
> Signed-off-by: Alexander Stein <alexander.stein at systec-electronic.com>
> ---
> common/image.c | 11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)
Why would this be needed? Do you have an error scenario?
> + if (to <= from)
> + {
> + memmove (to, from, tail);
> + to += tail;
> + from += tail;
> + } else {
> + memmove (to + len - tail, from + len - tail, tail);
In which way is this supposed to allow overlapping memory areas?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I think there's a world market for about five computers.
-- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943
More information about the U-Boot
mailing list