From d91f4d4bc1dc13f6e671d4be86d3c44a1bcd9277 Mon Sep 17 00:00:00 2001 From: Nemil Dalal Date: Wed, 6 Dec 2017 16:03:55 -0800 Subject: [PATCH 1/2] Consistent spellings of reentrant Changed `rentrancy_lock` variable to `reentrancy_lock` --- contracts/ReentrancyGuard.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/ReentrancyGuard.sol b/contracts/ReentrancyGuard.sol index 461c431b0dc..b076d55009a 100644 --- a/contracts/ReentrancyGuard.sol +++ b/contracts/ReentrancyGuard.sol @@ -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; } } From 161f25fc12a6bc45c356076dcce49cff10855a0d Mon Sep 17 00:00:00 2001 From: Nemil Dalal Date: Thu, 7 Dec 2017 22:48:55 -0800 Subject: [PATCH 2/2] Made spelling for 'reentrant' consistent in comment --- contracts/ReentrancyGuard.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/ReentrancyGuard.sol b/contracts/ReentrancyGuard.sol index b076d55009a..00daf58328d 100644 --- a/contracts/ReentrancyGuard.sol +++ b/contracts/ReentrancyGuard.sol @@ -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 * @notice If you mark a function `nonReentrant`, you should also * mark it `external`.