]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: cosmetic: drop assignment i = iomux_doenv()
authorGerlando Falauto <gerlando.falauto@keymile.com>
Fri, 24 Aug 2012 00:11:36 +0000 (00:11 +0000)
committerTom Rini <trini@ti.com>
Tue, 18 Sep 2012 19:01:52 +0000 (12:01 -0700)
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@keymile.com>
Reviewed-by: Marek Vasut <marex@denx.de>
common/cmd_nvedit.c

index 0f320cc724b11d61b3102e13f57ab6fce73fc53c..eef6c101d826d86acba6456bb19bec0356771d85 100644 (file)
@@ -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)