Re: [PATCH v3 17/32] submodule--helper: don't redundantly check "else if (res)"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 21, 2022 at 10:00 AM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> 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 <avarab@xxxxxxxxx>



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux