Skip to content

Commit 2709ffb

Browse files
committed
Merge bitcoin/bitcoin#25115: scripted-diff: replace non-standard fixed width integer types (u_int... -> uint...)
672d49c scripted-diff: replace non-standard fixed width integer types (`u_int`...` -> `uint`...) (Sebastian Falbesoner) Pull request description: Fixed width integer types prefixed with `u_int` are not part of C++ (see https://en.cppreference.com/w/cpp/types/integer), so it's better to avoid and replace them with their standard-conforming counterparts. (For those interested in history, according to one theory those u_int... types have been introduced by BSD: https://stackoverflow.com/a/5163960, http://lists.freedesktop.org/archives/release-wranglers/2004-August/000923.html). ACKs for top commit: laanwj: Code review ACK 672d49c fanquake: ACK 672d49c Tree-SHA512: 68134a0adca0d5c87a7432367cb493491a67288d69a174be2181f8e26efa968d966b9eb1cde94813942405063ee3be2a3437cf2aa5f71375f59205cbdbf501bb
2 parents dd9f61a + 672d49c commit 2709ffb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/validation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,9 +2454,9 @@ bool CChainState::FlushStateToDisk(
24542454
full_flush_completed = true;
24552455
TRACE5(utxocache, flush,
24562456
(int64_t)(GetTimeMicros() - nNow.count()), // in microseconds (µs)
2457-
(u_int32_t)mode,
2458-
(u_int64_t)coins_count,
2459-
(u_int64_t)coins_mem_usage,
2457+
(uint32_t)mode,
2458+
(uint64_t)coins_count,
2459+
(uint64_t)coins_mem_usage,
24602460
(bool)fFlushForPrune);
24612461
}
24622462
}

src/wallet/bdb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void BerkeleyEnvironment::Close()
9999
if (ret != 0)
100100
LogPrintf("BerkeleyEnvironment::Close: Error %d closing database environment: %s\n", ret, DbEnv::strerror(ret));
101101
if (!fMockDb)
102-
DbEnv((u_int32_t)0).remove(strPath.c_str(), 0);
102+
DbEnv((uint32_t)0).remove(strPath.c_str(), 0);
103103

104104
if (error_file) fclose(error_file);
105105

@@ -248,7 +248,7 @@ const void* BerkeleyBatch::SafeDbt::get_data() const
248248
return m_dbt.get_data();
249249
}
250250

251-
u_int32_t BerkeleyBatch::SafeDbt::get_size() const
251+
uint32_t BerkeleyBatch::SafeDbt::get_size() const
252252
{
253253
return m_dbt.get_size();
254254
}

src/wallet/bdb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct bilingual_str;
3434
namespace wallet {
3535

3636
struct WalletDatabaseFileId {
37-
u_int8_t value[DB_FILE_ID_LEN];
37+
uint8_t value[DB_FILE_ID_LEN];
3838
bool operator==(const WalletDatabaseFileId& rhs) const;
3939
};
4040

@@ -182,7 +182,7 @@ class BerkeleyBatch : public DatabaseBatch
182182

183183
// delegate to Dbt
184184
const void* get_data() const;
185-
u_int32_t get_size() const;
185+
uint32_t get_size() const;
186186

187187
// conversion operator to access the underlying Dbt
188188
operator Dbt*();

0 commit comments

Comments
 (0)