summaryrefslogtreecommitdiffstats
path: root/atc
diff options
context:
space:
mode:
authorjrf <jrf@NetBSD.org>2004-09-07 13:20:39 +0000
committerjrf <jrf@NetBSD.org>2004-09-07 13:20:39 +0000
commit2aa9d1c9dd8fe6a21ef55ac92c224c9b3d9701ad (patch)
treecbb709392f5d6086ee3ace79049f80e1cf907d55 /atc
parentde4d1a52a2092219d32f0f0b88b2f3efa7cee540 (diff)
downloadbsdgames-darwin-2aa9d1c9dd8fe6a21ef55ac92c224c9b3d9701ad.tar.gz
bsdgames-darwin-2aa9d1c9dd8fe6a21ef55ac92c224c9b3d9701ad.tar.zst
bsdgames-darwin-2aa9d1c9dd8fe6a21ef55ac92c224c9b3d9701ad.zip
Replaced strncpy with strlcpy. Thanks to Peter Postma who
pointed them our in PR #25762. Approved by christos@NetBSD.org.
Diffstat (limited to 'atc')
-rw-r--r--atc/log.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/atc/log.c b/atc/log.c
index 5f5d9bfe..a92aaae5 100644
--- a/atc/log.c
+++ b/atc/log.c
@@ -1,4 +1,4 @@
-/* $NetBSD: log.c,v 1.12 2003/08/07 09:36:54 agc Exp $ */
+/* $NetBSD: log.c,v 1.13 2004/09/07 13:20:39 jrf Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: log.c,v 1.12 2003/08/07 09:36:54 agc Exp $");
+__RCSID("$NetBSD: log.c,v 1.13 2004/09/07 13:20:39 jrf Exp $");
#endif
#endif /* not lint */
@@ -180,8 +180,7 @@ log_score(list_em)
}
strcpy(thisscore.name, pw->pw_name);
uname(&name);
- strncpy(thisscore.host, name.nodename, sizeof(thisscore.host)-1);
- thisscore.host[sizeof(thisscore.host) - 1] = '\0';
+ strlcpy(thisscore.host, name.nodename, sizeof(thisscore.host));
cp = strrchr(file, '/');
if (cp == NULL) {