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/frame.c | |
| parent | c59592b32f5b5808c12720bfd37ea73b473fa1db (diff) | |
| download | emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.tar.gz emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.zip | |
Simplify by avoiding confusing use of strncpy etc.
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/frame.c b/src/frame.c index 3a3f5526035..8d7981777bf 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -646,7 +646,7 @@ affects all frames on the same terminal device. */) | |||
| 646 | if (!NILP (tty)) | 646 | if (!NILP (tty)) |
| 647 | { | 647 | { |
| 648 | name = alloca (SBYTES (tty) + 1); | 648 | name = alloca (SBYTES (tty) + 1); |
| 649 | strncpy (name, SSDATA (tty), SBYTES (tty)); | 649 | memcpy (name, SSDATA (tty), SBYTES (tty)); |
| 650 | name[SBYTES (tty)] = 0; | 650 | name[SBYTES (tty)] = 0; |
| 651 | } | 651 | } |
| 652 | 652 | ||
| @@ -657,7 +657,7 @@ affects all frames on the same terminal device. */) | |||
| 657 | if (!NILP (tty_type)) | 657 | if (!NILP (tty_type)) |
| 658 | { | 658 | { |
| 659 | type = alloca (SBYTES (tty_type) + 1); | 659 | type = alloca (SBYTES (tty_type) + 1); |
| 660 | strncpy (type, SSDATA (tty_type), SBYTES (tty_type)); | 660 | memcpy (type, SSDATA (tty_type), SBYTES (tty_type)); |
| 661 | type[SBYTES (tty_type)] = 0; | 661 | type[SBYTES (tty_type)] = 0; |
| 662 | } | 662 | } |
| 663 | 663 | ||