# HG changeset patch # User Jim Meyering # Date 1346751069 -7200 # Node ID 60627a1a95ffb6063d02dd48fe52ce5684f9a76f # Parent c89c8028d220d9bc0b27bc8d34c8a5532aca27af fts: when there is no risk of overlap, use memcpy, not memmove * lib/fts.c (fts_alloc): Fix unjustified memmove: s/memmove/memcpy/ diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-04 Jim Meyering + + fts: when there is no risk of overlap, use memcpy, not memmove + * lib/fts.c (fts_alloc): Fix unjustified memcopy: s/memmove/memcpy/ + 2012-08-29 Paul Eggert stdbool: be more compatible with mixed C/C++ compiles diff --git a/lib/fts.c b/lib/fts.c --- a/lib/fts.c +++ b/lib/fts.c @@ -1894,7 +1894,7 @@ return (NULL); /* Copy the name and guarantee NUL termination. */ - memmove(p->fts_name, name, namelen); + memcpy(p->fts_name, name, namelen); p->fts_name[namelen] = '\0'; p->fts_namelen = namelen;