diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-10 14:48:34 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-10 14:48:34 -0700 |
commit | e99a530f8cdca3ccd9e739cd092ed9865d12fe89 (patch) | |
tree | c2bef9f80ff9910be17757a83f61caed02146d0a /src/doc.c | |
parent | c59592b32f5b5808c12720bfd37ea73b473fa1db (diff) | |
download | emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.tar.gz |
Simplify by avoiding confusing use of strncpy etc.
Diffstat (limited to 'src/doc.c')
-rw-r--r-- | src/doc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c index 7d82211faea..44363e30e82 100644 --- a/src/doc.c +++ b/src/doc.c @@ -645,7 +645,7 @@ the same file name is found in the `doc-directory'. */) { ptrdiff_t len = end - p - 2; char *fromfile = alloca (len + 1); - strncpy (fromfile, &p[2], len); + memcpy (fromfile, &p[2], len); fromfile[len] = 0; if (fromfile[len-1] == 'c') fromfile[len-1] = 'o'; |