mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Squashed 'src/univalue/' changes from 7890db99d6..5a58a46671
5a58a46671 Merge #21: Remove hand-coded UniValue destructor. b4cdfc4f47 Remove hand-coded UniValue destructor. 7fba60b5ad Merge #17: [docs] Update readme 4577454e7e Merge #13: Fix typo ac7e73cda8 [docs] Update readme 4a4964729b Fix typo git-subtree-dir: src/univalue git-subtree-split: 5a58a46671d3c1711e93d2fc7961085515c8c7a7
This commit is contained in:
@@ -35,7 +35,7 @@ bool ParseInt32(const std::string& str, int32_t *out)
|
||||
errno = 0; // strtol will not set errno if valid
|
||||
long int n = strtol(str.c_str(), &endp, 10);
|
||||
if(out) *out = (int32_t)n;
|
||||
// Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow
|
||||
// Note that strtol returns a *long int*, so even if strtol doesn't report an over/underflow
|
||||
// we still have to check that the returned value is within the range of an *int32_t*. On 64-bit
|
||||
// platforms the size of these types may be different.
|
||||
return endp && *endp == 0 && !errno &&
|
||||
|
||||
Reference in New Issue
Block a user