[U-Boot] [PATCH v4 1/7] env: cosmetic: drop assignment i = iomux_doenv()
Gerlando Falauto
gerlando.falauto at keymile.com
Fri Aug 24 12:11:36 CEST 2012
iomux_doenv() can only return 0 or 1.
So there is no need to save its return value in variable i, as checking
its truth value within an if statement is enough.
Signed-off-by: Gerlando Falauto <gerlando.falauto at keymile.com>
---
common/cmd_nvedit.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index fd05e72..b8c7676 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -239,9 +239,8 @@ int _do_env_set(int flag, int argc, char * const argv[])
}
#ifdef CONFIG_CONSOLE_MUX
- i = iomux_doenv(console, argv[2]);
- if (i)
- return i;
+ if (iomux_doenv(console, argv[2]))
+ return 1;
#else
/* Try assigning specified device */
if (console_assign(console, argv[2]) < 0)
--
1.7.10.4
More information about the U-Boot
mailing list