diff options
| author | elad <elad@NetBSD.org> | 2006-06-17 08:22:06 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-06-17 08:22:06 +0000 |
| commit | 1b28df2fb7c475857636dc5e8a965a8ce6336a4d (patch) | |
| tree | 3c0eb2cf23a57b8cf6fc89a9e7ab3513be82bbc8 /usr.bin/write/write.c | |
| parent | 4adbe74d71360a2bc0cb31ddf276d60678c124ff (diff) | |
strncpy -> strlcpy
Diffstat (limited to 'usr.bin/write/write.c')
| -rw-r--r-- | usr.bin/write/write.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 723c8ce53bc..1ccb458a015 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -1,4 +1,4 @@ -/* $NetBSD: write.c,v 1.23 2003/08/07 11:17:48 agc Exp $ */ +/* $NetBSD: write.c,v 1.24 2006/06/17 08:22:06 elad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)write.c 8.2 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: write.c,v 1.23 2003/08/07 11:17:48 agc Exp $"); +__RCSID("$NetBSD: write.c,v 1.24 2006/06/17 08:22:06 elad Exp $"); #endif #endif /* not lint */ @@ -239,7 +239,7 @@ do_write(int ttyfd, const char *mytty, const uid_t myuid) /* print greeting */ if (gethostname(host, sizeof(host)) < 0) - (void)strncpy(host, "???", sizeof(host) - 1); + (void)strlcpy(host, "???", sizeof(host)); else host[sizeof(host) - 1] = '\0'; now = time((time_t *)NULL); |
