[PATCH 22/39] net: Drop #ifdef in parse_args()
Ilias Apalodimas
ilias.apalodimas at linaro.org
Fri Nov 22 13:33:47 CET 2024
On Tue, 19 Nov 2024 at 15:19, Simon Glass <sjg at chromium.org> wrote:
>
> Use IS_ENABLED() to avoid an extra build path.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> cmd/net.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/cmd/net.c b/cmd/net.c
> index f1b520143df..03b33aa1f20 100644
> --- a/cmd/net.c
> +++ b/cmd/net.c
> @@ -366,13 +366,13 @@ static int parse_args(enum proto_t proto, int argc, char *const argv[],
> }
> break;
>
> -#ifdef CONFIG_CMD_TFTPPUT
> case 4:
> - if (parse_addr_size(argv, addrp, sizep))
> - return 1;
> - *fnamep = argv[3];
> - break;
> -#endif
> + if (IS_ENABLED(CONFIG_CMD_TFTPPUT)) {
> + if (parse_addr_size(argv, addrp, sizep))
> + return 1;
> + *fnamep = argv[3];
> + break;
> + }
> default:
> return 1;
> }
> --
> 2.34.1
>
Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list