Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Wang committed Nov 8, 2023
1 parent 85be018 commit b2f8d03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/Comet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ contract Comet is CometMainInterface {
status := sload(slot)
}

if(status == COMET_REENTRANCY_GUARD_ENTERED) revert ReentrantCallBlocked();
if (status == COMET_REENTRANCY_GUARD_ENTERED) revert ReentrantCallBlocked();
assembly {

Check warning on line 218 in contracts/Comet.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Avoid to use inline assembly. It is acceptable only in rare cases
sstore(slot, COMET_REENTRANCY_GUARD_ENTERED)
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/CometCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ abstract contract CometCore is CometConfiguration, CometStorage, CometMath {
bytes32 internal constant COMET_REENTRANCY_GUARD_FLAG_SLOT = bytes32(keccak256("comet.reentrancy.guard"));

/// @dev The reentrancy guard status
uint256 internal constant COMET_REENTRANCY_GUARD_NOT_ENTERED = 1;
uint256 internal constant COMET_REENTRANCY_GUARD_NOT_ENTERED = 0;
uint256 internal constant COMET_REENTRANCY_GUARD_ENTERED = 2;

/**
Expand Down

0 comments on commit b2f8d03

Please sign in to comment.