From: Jim Meyering Date: Tue, 4 Sep 2012 09:31:09 +0000 (+0200) Subject: fts: when there is no risk of overlap, use memcpy, not memmove X-Git-Tag: v0.1~455 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=acb0726a65e9a6c954adcd50b50d4d02c016de26;hp=e78c0c11704500893203872898640bb23162a6f0;p=gnulib.git 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 index f484d28b7..d4d2cb105 100644 --- 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 index 42c806770..ce14a807f 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -1894,7 +1894,7 @@ fts_alloc (FTS *sp, const char *name, register size_t namelen) 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;