diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-12-22 03:21:58 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-12-22 03:21:58 +0000 |
commit | abe07ef099ab34267c3c2c570597f6744fb89667 (patch) | |
tree | cac87280a4f8c0e7877c29f3fabd216bba5b8bab /sys/scsi | |
parent | 7073660ccb208705ca4f7a9a904281226199b00e (diff) |
Initialize data_track before a 'goto done;' could lead to it being
used.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 6eb1cd4b5e0..34b837db358 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.97 2005/10/15 18:18:36 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.98 2005/12/22 03:21:57 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -1179,7 +1179,7 @@ cdgetdisklabel(dev, cd, lp, clp, spoofonly) u_int32_t lba, nlba; u_int8_t hdr[TOC_HEADER_SZ], *ent, *toc = NULL; char *errstring; - int tocidx, n, len, is_data, data_track; + int tocidx, n, len, is_data, data_track = 0; bzero(lp, sizeof(struct disklabel)); bzero(clp, sizeof(struct cpu_disklabel)); @@ -1248,7 +1248,6 @@ cdgetdisklabel(dev, cd, lp, clp, spoofonly) if (cd->sc_link->quirks & ADEV_LITTLETOC) lba = swap32(lba); - data_track = 0; for (tocidx = 1; tocidx <= n && data_track < MAXPARTITIONS; tocidx++) { is_data = ent[TOC_ENTRY_CONTROL_ADDR_TYPE] & 4; ent += TOC_ENTRY_SZ; |