From: Eric Sunshine Date: Sun, 21 Aug 2022 16:12:05 GMT Subject: Re: [PATCH v3 17/32] submodule--helper: don't redundantly check "else if (res)" Message-ID: In-Reply-To: On Sun, Aug 21, 2022 at 10:00 AM Ævar Arnfjörð Bjarmason wrote: > The "res" variable must be true at this point in update_submodule(), > as just a few lines above this we've unconditionally: > > if (!res) > return 0; > > So we don't need to guard the "return 1" with an "else if (res)", we > an return unconditionally at this point. See b3c5f5cb048 (submodule: s/an/can/ > move core cmd_update() logic to C, 2022-03-15) for the initial > introduction of this code, this check of "res" has always been > redundant. > > Signed-off-by: Ævar Arnfjörð Bjarmason