diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:12 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:24 -0400 |
commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /net/tftp.c | |
parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) | |
download | u-boot-00caae6d47645e68d6e5277aceb69592b49381a6.tar.gz |
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/tftp.c')
-rw-r--r-- | net/tftp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/tftp.c b/net/tftp.c index 61e1671068..a5ed8c5d0a 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -706,11 +706,11 @@ void tftp_start(enum proto_t protocol) * TFTP protocol has a minimal timeout of 1 second. */ - ep = getenv("tftpblocksize"); + ep = env_get("tftpblocksize"); if (ep != NULL) tftp_block_size_option = simple_strtol(ep, NULL, 10); - ep = getenv("tftptimeout"); + ep = env_get("tftptimeout"); if (ep != NULL) timeout_ms = simple_strtol(ep, NULL, 10); @@ -720,7 +720,7 @@ void tftp_start(enum proto_t protocol) timeout_ms = 1000; } - ep = getenv("tftptimeoutcountmax"); + ep = env_get("tftptimeoutcountmax"); if (ep != NULL) tftp_timeout_count_max = simple_strtol(ep, NULL, 10); @@ -822,10 +822,10 @@ void tftp_start(enum proto_t protocol) tftp_our_port = 1024 + (get_timer(0) % 3072); #ifdef CONFIG_TFTP_PORT - ep = getenv("tftpdstp"); + ep = env_get("tftpdstp"); if (ep != NULL) tftp_remote_port = simple_strtol(ep, NULL, 10); - ep = getenv("tftpsrcp"); + ep = env_get("tftpsrcp"); if (ep != NULL) tftp_our_port = simple_strtol(ep, NULL, 10); #endif |