changeset 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 c89c8028d220
children d4ccb0388f18
files ChangeLog lib/fts.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-04  Jim Meyering  <meyering@redhat.com>
+
+	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  <eggert@cs.ucla.edu>
 
 	stdbool: be more compatible with mixed C/C++ compiles
--- 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;