diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2007-06-07 03:50:21 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2007-06-07 03:50:21 +0000 |
commit | 21bce5c136bec1eeac6d2ec2d057c36ec8504f86 (patch) | |
tree | ab84c78dbf96916ff0833bcf89453f2c54e14476 | |
parent | 73120a1505319d919849882285cbc9c98e311203 (diff) |
strncpy -> strlcpy, plus a little spacing line up.
OK deraadt.
-rw-r--r-- | sys/dev/ata/wd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 82722893171..191cffe26cd 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.62 2007/06/06 17:15:13 deraadt Exp $ */ +/* $OpenBSD: wd.c,v 1.63 2007/06/07 03:50:20 ray Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -137,7 +137,7 @@ struct wd_softc { #define WDF_LOCKED 0x01 #define WDF_WANTED 0x02 #define WDF_WLABEL 0x04 /* label is writable */ -#define WDF_LABELLING 0x08 /* writing label */ +#define WDF_LABELLING 0x08 /* writing label */ /* * XXX Nothing resets this yet, but disk change sensing will when ATA-4 is * more fully implemented. @@ -233,8 +233,8 @@ wdattach(struct device *parent, struct device *self, void *aux) wd->openings = aa_link->aa_openings; wd->drvp = aa_link->aa_drv_data; - strncpy(wd->drvp->drive_name, wd->sc_dev.dv_xname, - sizeof(wd->drvp->drive_name) - 1); + strlcpy(wd->drvp->drive_name, wd->sc_dev.dv_xname, + sizeof(wd->drvp->drive_name)); wd->drvp->cf_flags = wd->sc_dev.dv_cfdata->cf_flags; if ((NERRS_MAX - 2) > 0) |