aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-09-05 23:36:19 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-09-12 21:30:47 +0200
commit463a1cab43fda24f89f71fffc876756dc1bc155a (patch)
tree718d8862d35004ad08cce7986534f51d9776c91f /src/main.h
parent0a4e67afadd738151ae1cd4468b5422a21a0eabf (diff)
fix signed/unsigned in strprintf and CNetAddr::GetByte()
- I checked every occurance of strprintf() in the code and used %u, where unsigned vars are used - the change to GetByte() was made, as ip is an unsigned char
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.h b/src/main.h
index e61cbdd46b..a233f00f46 100644
--- a/src/main.h
+++ b/src/main.h
@@ -158,7 +158,7 @@ public:
if (IsNull())
return "null";
else
- return strprintf("(nFile=%d, nBlockPos=%d, nTxPos=%d)", nFile, nBlockPos, nTxPos);
+ return strprintf("(nFile=%u, nBlockPos=%u, nTxPos=%u)", nFile, nBlockPos, nTxPos);
}
void print() const
@@ -214,7 +214,7 @@ public:
std::string ToString() const
{
- return strprintf("COutPoint(%s, %d)", hash.ToString().substr(0,10).c_str(), n);
+ return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10).c_str(), n);
}
void print() const
@@ -632,7 +632,7 @@ public:
std::string ToString() const
{
std::string str;
- str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%d, vout.size=%d, nLockTime=%d)\n",
+ str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
GetHash().ToString().substr(0,10).c_str(),
nVersion,
vin.size(),
@@ -1174,7 +1174,7 @@ public:
std::string ToString() const
{
- return strprintf("CBlockIndex(pprev=%08x, pnext=%08x, nFile=%d, nBlockPos=%-6d nHeight=%d, merkle=%s, hashBlock=%s)",
+ return strprintf("CBlockIndex(pprev=%08x, pnext=%08x, nFile=%u, nBlockPos=%-6u nHeight=%d, merkle=%s, hashBlock=%s)",
pprev, pnext, nFile, nBlockPos, nHeight,
hashMerkleRoot.ToString().substr(0,10).c_str(),
GetBlockHash().ToString().substr(0,20).c_str());