All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven A. Falco <sfalco@harris.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Patch to clean up syntax highlighting
Date: Thu, 12 Jun 2008 13:24:42 -0400	[thread overview]
Message-ID: <48515BDA.8080404@harris.com> (raw)


My text-editor (vim) has a bit of trouble syntax-highlighting the cmd_nvedit.c
file, because it apparently does not parse C ifdef/else/endif.  The following
patch does not change the behavior of the code at all, but does allow the
editor to properly syntax-highlight the file.

Comments invited.

Signed-off-by: Steve Falco <sfalco@harris.com>

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 9c5d1fc..1ac91ea 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -179,11 +179,12 @@ int _do_setenv (int flag, int argc, char *argv[])
 		 * Ethernet Address and serial# can be set only once,
 		 * ver is readonly.
 		 */
+		if (
 #ifdef CONFIG_HAS_UID
 		/* Allow serial# forced overwrite with 0xdeaf4add flag */
-		if ( ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) ||
+		    ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) ||
 #else
-		if ( (strcmp (name, "serial#") == 0) ||
+		    (strcmp (name, "serial#") == 0) ||
 #endif
 		    ((strcmp (name, "ethaddr") == 0)
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)

             reply	other threads:[~2008-06-12 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 17:24 Steven A. Falco [this message]
2008-06-13  3:55 ` [U-Boot-Users] Patch to clean up syntax highlighting Jerry Van Baren
2008-06-13 12:14   ` Jerry Van Baren
2008-06-13 13:38     ` Steven A. Falco
2008-06-15 14:56     ` Haavard Skinnemoen
2008-07-05 22:32 ` Wolfgang Denk

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=48515BDA.8080404@harris.com \
    --to=sfalco@harris.com \
    --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.