diff options
| author | Paul Eggert | 2012-07-10 14:48:34 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-10 14:48:34 -0700 |
| commit | e99a530f8cdca3ccd9e739cd092ed9865d12fe89 (patch) | |
| tree | c2bef9f80ff9910be17757a83f61caed02146d0a /src/doc.c | |
| parent | c59592b32f5b5808c12720bfd37ea73b473fa1db (diff) | |
| download | emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.tar.gz emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.zip | |
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
| @@ -645,7 +645,7 @@ the same file name is found in the `doc-directory'. */) | |||
| 645 | { | 645 | { |
| 646 | ptrdiff_t len = end - p - 2; | 646 | ptrdiff_t len = end - p - 2; |
| 647 | char *fromfile = alloca (len + 1); | 647 | char *fromfile = alloca (len + 1); |
| 648 | strncpy (fromfile, &p[2], len); | 648 | memcpy (fromfile, &p[2], len); |
| 649 | fromfile[len] = 0; | 649 | fromfile[len] = 0; |
| 650 | if (fromfile[len-1] == 'c') | 650 | if (fromfile[len-1] == 'c') |
| 651 | fromfile[len-1] = 'o'; | 651 | fromfile[len-1] = 'o'; |