[PATCH v3 28/46] net: Drop #ifdef in parse_args()
Simon Glass
sjg at chromium.org
Fri Dec 6 03:36:07 CET 2024
Use IS_ENABLED() to avoid an extra build path.
Signed-off-by: Simon Glass <sjg at chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
(no changes since v1)
cmd/net.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/cmd/net.c b/cmd/net.c
index f980448e0ef..6d1c6374f76 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -368,13 +368,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
More information about the U-Boot
mailing list