mirror of
https://github.com/aria2/aria2.git
synced 2024-11-27 03:54:21 +08:00
Fix issues reported by coverity
This commit is contained in:
parent
59c625b1fd
commit
ce868d75bd
@ -46,6 +46,7 @@ DownloadResult::DownloadResult()
|
||||
totalLength(0),
|
||||
completedLength(0),
|
||||
uploadLength(0),
|
||||
following(0),
|
||||
numPieces(0),
|
||||
pieceLength(0),
|
||||
result(error_code::UNDEFINED),
|
||||
|
@ -586,10 +586,8 @@ bool parseUIntNoThrow(uint32_t& res, const std::string& s, int base)
|
||||
|
||||
bool parseLLIntNoThrow(int64_t& res, const std::string& s, int base)
|
||||
{
|
||||
long long int t;
|
||||
if (parseLong(t, strtoll, s, base) &&
|
||||
t >= std::numeric_limits<int64_t>::min() &&
|
||||
t <= std::numeric_limits<int64_t>::max()) {
|
||||
int64_t t;
|
||||
if (parseLong(t, strtoll, s, base)) {
|
||||
res = t;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user