From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 24 Aug 2012 16:44:31 +0200 Subject: [U-Boot] [PATCH v4 1/7] env: cosmetic: drop assignment i = iomux_doenv() In-Reply-To: <1345803102-21110-2-git-send-email-gerlando.falauto@keymile.com> References: <1321634955-5561-1-git-send-email-gerlando.falauto@keymile.com> <1345803102-21110-1-git-send-email-gerlando.falauto@keymile.com> <1345803102-21110-2-git-send-email-gerlando.falauto@keymile.com> Message-ID: <201208241644.32159.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Gerlando Falauto, > 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 Reviewed-by: Marek Vasut > --- > 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) Best regards, Marek Vasut