diff options
| author | Simon Glass <sjg@chromium.org> | 2013-05-15 06:23:57 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-06-04 16:06:31 -0400 | 
| commit | f2abca8459cf873147f37c0a1fe007ccc36a8926 (patch) | |
| tree | 8e840cd69d2962890d13a7282114908eab79377e | |
| parent | bc2b4c27d0fcdaac45f704d9ae05ef0bab3dc928 (diff) | |
| download | olio-uboot-2014.01-f2abca8459cf873147f37c0a1fe007ccc36a8926.tar.xz olio-uboot-2014.01-f2abca8459cf873147f37c0a1fe007ccc36a8926.zip | |
main: Use get/setenv_ulong()
These functions are now available, so use them to avoid extra code here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| -rw-r--r-- | common/main.c | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/common/main.c b/common/main.c index 159b8e145..38fadac3e 100644 --- a/common/main.c +++ b/common/main.c @@ -352,18 +352,14 @@ static void process_boot_delay(void)  #ifdef CONFIG_BOOTCOUNT_LIMIT  	unsigned long bootcount = 0;  	unsigned long bootlimit = 0; -	char *bcs; -	char bcs_set[16];  #endif /* CONFIG_BOOTCOUNT_LIMIT */  #ifdef CONFIG_BOOTCOUNT_LIMIT  	bootcount = bootcount_load();  	bootcount++;  	bootcount_store (bootcount); -	sprintf (bcs_set, "%lu", bootcount); -	setenv ("bootcount", bcs_set); -	bcs = getenv ("bootlimit"); -	bootlimit = bcs ? simple_strtoul (bcs, NULL, 10) : 0; +	setenv_ulong("bootcount", bootcount); +	bootlimit = getenv_ulong("bootlimit", 10, 0);  #endif /* CONFIG_BOOTCOUNT_LIMIT */  	s = getenv ("bootdelay"); |