]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common/cli_hush.c: remove unnecessary double braces
authorJeroen Hofstee <jeroen@myspectrum.nl>
Tue, 10 Jun 2014 22:28:47 +0000 (00:28 +0200)
committerTom Rini <trini@ti.com>
Wed, 11 Jun 2014 20:27:06 +0000 (16:27 -0400)
Clang interpretes an if condition like  "if ((a = b) == NULL)
as it tries to assign a value in a statement. Hence if you do
"if ((something)) it warns you that you might be confused.
Hence drop the double braces for plane if statements.

Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
common/cli_hush.c

index e0c436f1a7c799f6d441d3843097a0f8b5205fdf..38da5a09fa30d76c245088f44811c53bcb0c99f6 100644 (file)
@@ -1840,7 +1840,7 @@ static int run_list_real(struct pipe *pi)
                if (rmode == RES_DO) {
                        if (!flag_rep) continue;
                }
-               if ((rmode == RES_DONE)) {
+               if (rmode == RES_DONE) {
                        if (flag_rep) {
                                flag_restore = 1;
                        } else {
@@ -3569,7 +3569,7 @@ static char **make_list_in(char **inp, char *name)
                p3 = insert_var_value(inp[i]);
                p1 = p3;
                while (*p1) {
-                       if ((*p1 == ' ')) {
+                       if (*p1 == ' ') {
                                p1++;
                                continue;
                        }