summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-04-06 15:28:27 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-04-06 15:28:27 +0000
commit28ba628961519d495cf13b25437f1617b422083c (patch)
treeea97e6551679efb7386cfe5cb8f600d4a171bc6d /sys/arch/mvme68k
parent44f7ce86801ec41f302d30dceda2a7be3ed17c26 (diff)
Some easy strcpy elimination.
a) strcpy -> strncpy for copies into disklabel fields d_packname and d_typename. b) '16' -> 'sizeof d_packname' or 'sizeof d_typename' in existing strncpy's. ok millert@
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r--sys/arch/mvme68k/mvme68k/disksubr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c
index c3f74d139b4..a7678e32536 100644
--- a/sys/arch/mvme68k/mvme68k/disksubr.c
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.26 2002/08/21 18:59:05 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.27 2003/04/06 15:28:26 krw Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -545,8 +545,8 @@ cputobsdlabel(lp, clp)
lp->d_magic = clp->magic1;
lp->d_type = clp->type;
lp->d_subtype = clp->subtype;
- strncpy(lp->d_typename, clp->vid_vd, 16);
- strncpy(lp->d_packname, clp->packname, 16);
+ strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename);
+ strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname);
lp->d_secsize = clp->cfg_psm;
lp->d_nsectors = clp->cfg_spt;
lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */
@@ -609,8 +609,8 @@ cputobsdlabel(lp, clp)
lp->d_magic = clp->magic1;
lp->d_type = clp->type;
lp->d_subtype = clp->subtype;
- strncpy(lp->d_typename, clp->vid_vd, 16);
- strncpy(lp->d_packname, clp->packname, 16);
+ strncpy(lp->d_typename, clp->vid_vd, sizeof lp->d_typename);
+ strncpy(lp->d_packname, clp->packname, sizeof lp->d_packname);
lp->d_secsize = clp->cfg_psm;
lp->d_nsectors = clp->cfg_spt;
lp->d_ncylinders = clp->cfg_trk; /* trk is really num of cyl! */