diff mbox series

[v3,1/2] cmd: load: Fix code indentation

Message ID f086c12da3df4f69f857303d7bd7d0ad07186bd9.1606895142.git.michal.simek@xilinx.com
State Accepted
Commit e7fcfef431af04f38819555ae407d540f5ba1c93
Delegated to: Michal Simek
Headers show
Series [v3,1/2] cmd: load: Fix code indentation | expand

Commit Message

Michal Simek Dec. 2, 2020, 7:45 a.m. UTC
Reported by smatch like:
cmd/load.c:228 read_record() warn: inconsistent indenting

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v3:
- Remove additional dt changes

Changes in v2:
- One } was missing. Get it back.

 cmd/load.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Simon Glass Dec. 3, 2020, 2:04 a.m. UTC | #1
On Wed, 2 Dec 2020 at 00:45, Michal Simek <michal.simek@xilinx.com> wrote:
>
> Reported by smatch like:
> cmd/load.c:228 read_record() warn: inconsistent indenting
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Changes in v3:
> - Remove additional dt changes
>
> Changes in v2:
> - One } was missing. Get it back.
>
>  cmd/load.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Michal Simek Jan. 5, 2021, 9:35 a.m. UTC | #2
st 2. 12. 2020 v 8:45 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Reported by smatch like:
> cmd/load.c:228 read_record() warn: inconsistent indenting
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> Changes in v3:
> - Remove additional dt changes
>
> Changes in v2:
> - One } was missing. Get it back.
>
>  cmd/load.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/cmd/load.c b/cmd/load.c
> index 9a3a16979c71..c6a7cc465153 100644
> --- a/cmd/load.c
> +++ b/cmd/load.c
> @@ -228,12 +228,11 @@ static int read_record(char *buf, ulong len)
>                         *p = c;
>                 }
>
> -           /* Check for the console hangup (if any different from serial) */
> -           if (gd->jt->getc != getchar) {
> -               if (ctrlc()) {
> -                   return (-1);
> +               /* Check for the console hangup (if any different from serial) */
> +               if (gd->jt->getc != getchar) {
> +                       if (ctrlc())
> +                               return (-1);
>                 }
> -           }
>         }
>
>         /* line too long - truncate */
> --
> 2.29.2
>

Applied.
M
diff mbox series

Patch

diff --git a/cmd/load.c b/cmd/load.c
index 9a3a16979c71..c6a7cc465153 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -228,12 +228,11 @@  static int read_record(char *buf, ulong len)
 			*p = c;
 		}
 
-	    /* Check for the console hangup (if any different from serial) */
-	    if (gd->jt->getc != getchar) {
-		if (ctrlc()) {
-		    return (-1);
+		/* Check for the console hangup (if any different from serial) */
+		if (gd->jt->getc != getchar) {
+			if (ctrlc())
+				return (-1);
 		}
-	    }
 	}
 
 	/* line too long - truncate */