<!-- canonical: https://0xsimao.com/findings/fuji-finance-unnecessary-extra-condition-statement -->

# Unnecessary extra condition in if statement

Low/Info · Three Sigma · Lending aggregator · 6th May, 2023

Finding 3S-FUJI-N16 of the Fuji Finance security review.

- Report: /reports/fuji-finance
- Source: https://cdn.sanity.io/files/qoqld077/staging/32181a28eac3175d15fb8924d249bb0d91ca350c.pdf

---

### Description

On the BorrowingVault.sol contract in the function _withdraw(...) the if statement
checks the following conditions:
if (totalDebt_ == 0 && supply > 0 && supply > totalDebt_)
If the first two conditions are true the third will always be true, therefore there is no need to
check it.

### Recommendation

Remove the third check in the if statement.

### Status

Addressed here: [Fujicracy/fuji-v2#625](https://github.com/Fujicracy/fuji-v2/pull/625)
