aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-08-08 02:47:52 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-08 18:48:59 +0800
commit576ba9197081f795c6cb6da1de30cb019d8ae607 (patch)
treede79492b1fc474c40f4b209c0c9f5eb6cd22a18b
parentbb518b59aa571ace18e0f50ddb847183952282d5 (diff)
downloaddexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar.gz
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar.bz2
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar.lz
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar.xz
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.tar.zst
dexon-solidity-576ba9197081f795c6cb6da1de30cb019d8ae607.zip
Adjust return expressions in compilation tests.
-rw-r--r--test/compilationTests/milestonetracker/RLP.sol14
-rw-r--r--test/contracts/Wallet.cpp3
2 files changed, 8 insertions, 9 deletions
diff --git a/test/compilationTests/milestonetracker/RLP.sol b/test/compilationTests/milestonetracker/RLP.sol
index e1f44457..75e3902e 100644
--- a/test/compilationTests/milestonetracker/RLP.sol
+++ b/test/compilationTests/milestonetracker/RLP.sol
@@ -46,7 +46,6 @@ library RLP {
subItem = next(self);
if(strict && !_validate(subItem))
revert();
- return;
}
function hasNext(Iterator memory self) internal view returns (bool) {
@@ -171,10 +170,11 @@ library RLP {
/// @return The bytes.
function toBytes(RLPItem memory self) internal returns (bytes memory bts) {
uint len = self._unsafe_length;
- if (len == 0)
- return;
- bts = new bytes(len);
- _copyToBytes(self._unsafe_memPtr, bts, len);
+ if (len != 0)
+ {
+ bts = new bytes(len);
+ _copyToBytes(self._unsafe_memPtr, bts, len);
+ }
}
/// @dev Decode an RLPItem into bytes. This will not work if the
@@ -359,9 +359,8 @@ library RLP {
if (b0 < DATA_SHORT_START) {
memPtr = start;
len = 1;
- return;
}
- if (b0 < DATA_LONG_START) {
+ else if (b0 < DATA_LONG_START) {
len = self._unsafe_length - 1;
memPtr = start + 1;
} else {
@@ -372,7 +371,6 @@ library RLP {
len = self._unsafe_length - 1 - bLen;
memPtr = start + bLen + 1;
}
- return;
}
// Assumes that enough memory has been allocated to store in target.
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index dc949063..ce50fe59 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -199,7 +199,7 @@ contract multiowned {
// determine what index the present sender is:
uint ownerIndex = m_ownerIndex[uint(msg.sender)];
// make sure they're an owner
- if (ownerIndex == 0) return;
+ if (ownerIndex == 0) return false;
PendingState storage pending = m_pending[_operation];
// if we're not yet working on this operation, switch over and reset the confirmation status.
@@ -228,6 +228,7 @@ contract multiowned {
// not enough: record that this owner in particular confirmed.
pending.yetNeeded--;
pending.ownersDone |= ownerIndexBit;
+ return false;
}
}
}