net: tftp: use IS_ENABLED(CONFIG_NET_TFTP_VARS) instead of #if
Nothing inside this block depends on NET_TFTP_VARS to be set to parse correctly. Switch to C if() in preparation for adding code before this (to avoid a declaration-after-statement warning). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> [trini: Update to cover CONFIG_TFTP_PORT case as well] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
06653c7010
commit
4b8c44e39c
@ -710,8 +710,8 @@ static int tftp_init_load_addr(void)
|
||||
|
||||
void tftp_start(enum proto_t protocol)
|
||||
{
|
||||
#if CONFIG_NET_TFTP_VARS
|
||||
char *ep; /* Environment pointer */
|
||||
__maybe_unused char *ep; /* Environment pointer */
|
||||
if (IS_ENABLED(CONFIG_NET_TFTP_VARS)) {
|
||||
|
||||
/*
|
||||
* Allow the user to choose TFTP blocksize and timeout.
|
||||
@ -745,7 +745,7 @@ void tftp_start(enum proto_t protocol)
|
||||
tftp_timeout_count_max);
|
||||
tftp_timeout_count_max = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
debug("TFTP blocksize = %i, TFTP windowsize = %d timeout = %ld ms\n",
|
||||
tftp_block_size_option, tftp_window_size_option, timeout_ms);
|
||||
|
Loading…
Reference in New Issue
Block a user