[PATCH 1/2] nvmet-auth: remove unnecessary break after goto
Christoph Hellwig
hch at lst.de
Fri May 19 22:01:26 PDT 2023
On Fri, May 19, 2023 at 02:40:51AM -0700, Chaitanya Kulkarni wrote:
> Remove dead break after goto.
As a trivial cleanup this looks fine, but I really hate the structure
of this code.
Can't we have local variables that we set to the dhchap_status and
dhchap_step, and then after the done label just conditionally assign
them if dhchap_status is non-zero? This should clean up a lot of
mess, especially we'd be done to very few assignments of the step,
and we could avoid jumping out of the switch entirely.
More information about the Linux-nvme
mailing list