Merge pull request #602 from nemild/patch-1

Consistent spellings of reentrant
This commit is contained in:
Francisco Giordano
2017-12-20 15:40:27 -03:00
committed by GitHub

View File

@ -1,7 +1,7 @@
pragma solidity ^0.4.18;
/**
* @title Helps contracts guard agains rentrancy attacks.
* @title Helps contracts guard agains reentrancy attacks.
* @author Remco Bloemen <remco@2π.com>
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`.
@ -11,7 +11,7 @@ contract ReentrancyGuard {
/**
* @dev We use a single lock for the whole contract.
*/
bool private rentrancy_lock = false;
bool private reentrancy_lock = false;
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
@ -22,10 +22,10 @@ contract ReentrancyGuard {
* wrapper marked as `nonReentrant`.
*/
modifier nonReentrant() {
require(!rentrancy_lock);
rentrancy_lock = true;
require(!reentrancy_lock);
reentrancy_lock = true;
_;
rentrancy_lock = false;
reentrancy_lock = false;
}
}