summaryrefslogtreecommitdiff
path: root/bsd.cc
diff options
context:
space:
mode:
authorRod Smith <rodsmith@rodsbooks.com>2021-03-17 21:57:12 -0400
committerRod Smith <rodsmith@rodsbooks.com>2021-03-17 21:59:18 -0400
commiteae9f7e2e1470ed2d5bc029180aa2adc88fbc4a7 (patch)
treedd82bf5ca410609032f73fe888a56d9f29ee3c93 /bsd.cc
parent80e66b25922ab78cf987f693bf5477e466b1443a (diff)
downloadsgdisk-eae9f7e2e1470ed2d5bc029180aa2adc88fbc4a7.tar.gz
Code cleanup based on 'infer' suggestions; mostly just dead stores.
One forgotten change
Diffstat (limited to 'bsd.cc')
-rw-r--r--bsd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd.cc b/bsd.cc
index f487f18..1ef7c81 100644
--- a/bsd.cc
+++ b/bsd.cc
@@ -44,7 +44,7 @@ BSDData::~BSDData(void) {
// just opens the device file and then calls an overloaded function to do
// the bulk of the work. Returns 1 on success, 0 on failure.
int BSDData::ReadBSDData(const string & device, uint64_t startSector, uint64_t endSector) {
- int allOK = 1;
+ int allOK;
DiskIO myDisk;
if (device != "") {
@@ -64,7 +64,7 @@ int BSDData::ReadBSDData(const string & device, uint64_t startSector, uint64_t e
// Load the BSD disklabel data from an already-opened disk
// file, starting with the specified sector number.
int BSDData::ReadBSDData(DiskIO *theDisk, uint64_t startSector, uint64_t endSector) {
- int allOK = 1;
+ int allOK;
int i, foundSig = 0, bigEnd = 0;
int relative = 0; // assume absolute partition sector numbering
uint8_t buffer[4096]; // I/O buffer