aboutsummaryrefslogtreecommitdiffstats
path: root/src/s/gnu-linux.h
diff options
context:
space:
mode:
authorPaul Eggert2012-07-10 14:48:34 -0700
committerPaul Eggert2012-07-10 14:48:34 -0700
commite99a530f8cdca3ccd9e739cd092ed9865d12fe89 (patch)
treec2bef9f80ff9910be17757a83f61caed02146d0a /src/s/gnu-linux.h
parentc59592b32f5b5808c12720bfd37ea73b473fa1db (diff)
downloademacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.tar.gz
emacs-e99a530f8cdca3ccd9e739cd092ed9865d12fe89.zip
Simplify by avoiding confusing use of strncpy etc.
Diffstat (limited to 'src/s/gnu-linux.h')
-rw-r--r--src/s/gnu-linux.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index e3d43249d81..6f45ee00b78 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -63,8 +63,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
63 close (fd); \ 63 close (fd); \
64 return -1; \ 64 return -1; \
65 } \ 65 } \
66 strncpy (pty_name, ptyname, sizeof (pty_name)); \ 66 snprintf (pty_name, sizeof pty_name, "%s", ptyname); \
67 pty_name[sizeof (pty_name) - 1] = 0; \
68 sigunblock (sigmask (SIGCHLD)); \ 67 sigunblock (sigmask (SIGCHLD)); \
69 } 68 }
70 69