From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: jdl-CYoMK+44s/E@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: [PATCH 03/10] Trivial style fixup
Date: Fri, 3 Feb 2012 16:12:02 +1100 [thread overview]
Message-ID: <1328245929-15443-4-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1328245929-15443-1-git-send-email-david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Having braces on an if branch but not the else branch, or vice
versa is ugly and can trick you when reading the code.
Signed-off-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
---
fdtget.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fdtget.c b/fdtget.c
index 48ab615..2c384b6 100644
--- a/fdtget.c
+++ b/fdtget.c
@@ -77,9 +77,9 @@ static int show_data(struct display_info *disp, const char *data, int len)
return 0;
}
size = disp->size;
- if (size == -1)
+ if (size == -1) {
size = (len % 4) == 0 ? 4 : 1;
- else if (len % size) {
+ } else if (len % size) {
fprintf(stderr, "Property length must be a multiple of "
"selected data size\n");
return -1;
--
1.7.8.3
next prev parent reply other threads:[~2012-02-03 5:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 5:11 [0/10] Assorted cleanups (esp for fdt{get,put} tests) David Gibson
[not found] ` <1328245929-15443-1-git-send-email-david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
2012-02-03 5:12 ` [PATCH 01/10] Update .gitignore for tests David Gibson
2012-02-03 5:12 ` [PATCH 02/10] Add quilt files to .gitignore David Gibson
2012-02-03 5:12 ` David Gibson [this message]
2012-02-03 5:12 ` [PATCH 04/10] Remove unused variable from test scripts David Gibson
2012-02-03 5:12 ` [PATCH 05/10] Use 'trap' builtin to clean up temporaries in " David Gibson
2012-02-03 5:12 ` [PATCH 06/10] Remove bashism from run_tests.sh David Gibson
2012-02-03 5:12 ` [PATCH 07/10] Factor signal checks out of test scripts David Gibson
2012-02-03 5:12 ` [PATCH 08/10] Clean up invocation of fdt{get,put} tests David Gibson
[not found] ` <1328245929-15443-9-git-send-email-david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
2012-02-03 15:47 ` Simon Glass
2012-02-03 5:12 ` [PATCH 09/10] Don't use diff to check fdt{get,put} results David Gibson
2012-02-03 5:12 ` [PATCH 10/10] Generate test data for fdtput more sensibly David Gibson
2012-02-03 14:45 ` [0/10] Assorted cleanups (esp for fdt{get,put} tests) Jon Loeliger
2012-02-03 18:22 ` Simon Glass
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=1328245929-15443-4-git-send-email-david@gibson.dropbear.id.au \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jdl-CYoMK+44s/E@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).