diff options
author | jrf <jrf@NetBSD.org> | 2004-09-07 13:20:39 +0000 |
---|---|---|
committer | jrf <jrf@NetBSD.org> | 2004-09-07 13:20:39 +0000 |
commit | 2aa9d1c9dd8fe6a21ef55ac92c224c9b3d9701ad (patch) | |
tree | cbb709392f5d6086ee3ace79049f80e1cf907d55 /atc | |
parent | de4d1a52a2092219d32f0f0b88b2f3efa7cee540 (diff) | |
download | bsdgames-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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) { |