summaryrefslogtreecommitdiffstats
path: root/sail/dr_1.c
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 /sail/dr_1.c
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 'sail/dr_1.c')
-rw-r--r--sail/dr_1.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sail/dr_1.c b/sail/dr_1.c
index 6610af4b..1d8b5444 100644
--- a/sail/dr_1.c
+++ b/sail/dr_1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dr_1.c,v 1.19 2003/08/07 09:37:41 agc Exp $ */
+/* $NetBSD: dr_1.c,v 1.20 2004/09/07 13:20:39 jrf Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dr_1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dr_1.c,v 1.19 2003/08/07 09:37:41 agc Exp $");
+__RCSID("$NetBSD: dr_1.c,v 1.20 2004/09/07 13:20:39 jrf Exp $");
#endif
#endif /* not lint */
@@ -429,10 +429,8 @@ next(void)
*tp = toupper(*tp);
p = tp;
}
- strncpy(bestship->file->captain, p,
+ strlcpy(bestship->file->captain, p,
sizeof bestship->file->captain);
- bestship->file->captain
- [sizeof bestship->file->captain - 1] = 0;
logger(bestship);
}
return -1;