Mercurial > gnulib
diff lib/fts.c @ 17073:60627a1a95ff
fts: when there is no risk of overlap, use memcpy, not memmove
* lib/fts.c (fts_alloc): Fix unjustified memmove: s/memmove/memcpy/
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 04 Sep 2012 11:31:09 +0200 |
parents | a712776b11ce |
children | d4ccb0388f18 |
line wrap: on
line diff
--- a/lib/fts.c Sun Sep 02 17:23:28 2012 -0700 +++ b/lib/fts.c Tue Sep 04 11:31:09 2012 +0200 @@ -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;