Skip to content

Commit 41bf159

Browse files
Remove unreachable code
1 parent 5cfdda2 commit 41bf159

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/rest.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ static bool rest_headers(HTTPRequest* req,
190190
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: .bin, .hex)");
191191
}
192192
}
193-
194-
// not reached
195-
return true; // continue to process further HTTP reqs on this cxn
196193
}
197194

198195
static bool rest_block(HTTPRequest* req,
@@ -253,9 +250,6 @@ static bool rest_block(HTTPRequest* req,
253250
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: " + AvailableDataFormatsString() + ")");
254251
}
255252
}
256-
257-
// not reached
258-
return true; // continue to process further HTTP reqs on this cxn
259253
}
260254

261255
static bool rest_block_extended(HTTPRequest* req, const std::string& strURIPart)
@@ -292,9 +286,6 @@ static bool rest_chaininfo(HTTPRequest* req, const std::string& strURIPart)
292286
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: json)");
293287
}
294288
}
295-
296-
// not reached
297-
return true; // continue to process further HTTP reqs on this cxn
298289
}
299290

300291
static bool rest_mempool_info(HTTPRequest* req, const std::string& strURIPart)
@@ -317,9 +308,6 @@ static bool rest_mempool_info(HTTPRequest* req, const std::string& strURIPart)
317308
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: json)");
318309
}
319310
}
320-
321-
// not reached
322-
return true; // continue to process further HTTP reqs on this cxn
323311
}
324312

325313
static bool rest_mempool_contents(HTTPRequest* req, const std::string& strURIPart)
@@ -342,9 +330,6 @@ static bool rest_mempool_contents(HTTPRequest* req, const std::string& strURIPar
342330
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: json)");
343331
}
344332
}
345-
346-
// not reached
347-
return true; // continue to process further HTTP reqs on this cxn
348333
}
349334

350335
static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
@@ -394,9 +379,6 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
394379
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: " + AvailableDataFormatsString() + ")");
395380
}
396381
}
397-
398-
// not reached
399-
return true; // continue to process further HTTP reqs on this cxn
400382
}
401383

402384
static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
@@ -581,9 +563,6 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
581563
return RESTERR(req, HTTP_NOT_FOUND, "output format not found (available: " + AvailableDataFormatsString() + ")");
582564
}
583565
}
584-
585-
// not reached
586-
return true; // continue to process further HTTP reqs on this cxn
587566
}
588567

589568
static const struct {

src/wallet/db.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,6 @@ bool CDB::Rewrite(CWalletDBWrapper& dbw, const char* pszSkip)
554554
}
555555
MilliSleep(100);
556556
}
557-
return false;
558557
}
559558

560559

@@ -680,7 +679,6 @@ bool CWalletDBWrapper::Backup(const std::string& strDest)
680679
}
681680
MilliSleep(100);
682681
}
683-
return false;
684682
}
685683

686684
void CWalletDBWrapper::Flush(bool shutdown)

0 commit comments

Comments
 (0)