Skip to content

Commit

Permalink
Merge pull request OpenZeppelin#602 from nemild/patch-1
Browse files Browse the repository at this point in the history
Consistent spellings of reentrant
  • Loading branch information
frangio authored Dec 20, 2017
2 parents ddcae62 + 161f25f commit 207b92f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/ReentrancyGuard.sol
Original file line number Diff line number Diff line change
@@ -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`.
Expand All @@ -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.
Expand All @@ -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;
}

}

0 comments on commit 207b92f

Please sign in to comment.