summaryrefslogtreecommitdiff
path: root/src/s/unixware.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/s/unixware.h')
-rw-r--r--src/s/unixware.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/s/unixware.h b/src/s/unixware.h
index e9ebb63f30a..5bda987ffe1 100644
--- a/src/s/unixware.h
+++ b/src/s/unixware.h
@@ -40,8 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
fatal("could not unlock slave pty"); \
if (!(ptyname = ptsname(fd))) \
fatal ("could not enable slave pty"); \
- strncpy(pty_name, ptyname, sizeof(pty_name)); \
- pty_name[sizeof(pty_name) - 1] = 0; \
+ snprintf (pty_name, sizeof pty_name, "%s", ptyname); \
}
/* Conservative garbage collection has not been tested, so for now