[U-Boot] [PATCH 3/5] cmd: bcb: Fix duplicated handling in two case-branches

Igor Opaniuk igor.opaniuk at gmail.com
Fri Jul 12 11:25:49 UTC 2019


On Fri, Jul 12, 2019 at 2:21 PM Eugeniu Rosca <erosca at de.adit-jv.com> wrote:
>
> Fix warning V1037 reported by PVS-Studio Static Analyzer:
> Two or more case-branches perform the same actions. Check lines: 49, 53
>
> Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB fields")
> Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
> ---
>  cmd/bcb.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/cmd/bcb.c b/cmd/bcb.c
> index 2bd5a744deb5..3b1c7434e287 100644
> --- a/cmd/bcb.c
> +++ b/cmd/bcb.c
> @@ -46,9 +46,6 @@ static int bcb_is_misused(int argc, char *const argv[])
>
>         switch (cmd) {
>         case BCB_CMD_LOAD:
> -               if (argc != 3)
> -                       goto err;
> -               break;
>         case BCB_CMD_FIELD_SET:
>                 if (argc != 3)
>                         goto err;
> --
> 2.22.0
>

Reviewed-by: Igor Opaniuk <igor.opaniuk at gmail.com>

-- 
Best regards - Freundliche GrĂ¼sse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk


More information about the U-Boot mailing list