All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] common/xyzModem.c: move empty statements to newline
Date: Wed, 11 Jun 2014 01:04:42 +0200	[thread overview]
Message-ID: <1402441482-12684-1-git-send-email-jeroen@myspectrum.nl> (raw)
In-Reply-To: <u-boot@lists.denx.de>

To prevent a warning for clang the loop without a body
is made more clear by moving it to a line of its own.
This prevents a clang warning.

cc: sbabic at denx.de
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

---
This ignores checkpatch warnings since somone forgot to burn
the GNU code style manual.

jeroen at yellow:~/software/u-boot$ ./scripts/checkpatch.pl 0001-common-xyzModem.c-move-empty-statements-to-newline.patch
WARNING: please, no spaces at the start of a line
+      while ((c = (*getc) ()) > -1)$

ERROR: code indent should use tabs where possible
+        ;$

WARNING: please, no spaces at the start of a line
+        ;$
---
 common/xyzModem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/xyzModem.c b/common/xyzModem.c
index 39f7d17..56f4bca 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -759,7 +759,8 @@ xyzModem_stream_terminate (bool abort, int (*getc) (void))
        * If we don't eat it now, RedBoot will think the user typed it.
        */
       ZM_DEBUG (zm_dprintf ("Trailing gunk:\n"));
-      while ((c = (*getc) ()) > -1);
+      while ((c = (*getc) ()) > -1)
+        ;
       ZM_DEBUG (zm_dprintf ("\n"));
       /*
        * Make a small delay to give terminal programs like minicom
-- 
1.8.3.2

             reply	other threads:[~2014-06-10 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 23:04 Jeroen Hofstee [this message]
2014-06-11 22:20 ` [U-Boot] common/xyzModem.c: move empty statements to newline Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402441482-12684-1-git-send-email-jeroen@myspectrum.nl \
    --to=jeroen@myspectrum.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.