From: Eldad Zack <eldad@fogrefinery.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>,
"J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Eldad Zack <eldad@fogrefinery.com>
Subject: [PATCH 1/2] sunrpc/cache.h: fix coding style
Date: Thu, 5 Jul 2012 01:00:25 +0200 [thread overview]
Message-ID: <1341442827-21339-1-git-send-email-eldad@fogrefinery.com> (raw)
Neaten code style in get_int()
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
---
include/linux/sunrpc/cache.h | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index f5fd616..0757887 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -220,10 +220,16 @@ static inline int get_int(char **bpp, int *anint)
char *ep;
int rv;
int len = qword_get(bpp, buf, 50);
- if (len < 0) return -EINVAL;
- if (len ==0) return -ENOENT;
+
+ if (len < 0)
+ return -EINVAL;
+ if (len == 0)
+ return -ENOENT;
+
rv = simple_strtol(buf, &ep, 0);
- if (*ep) return -EINVAL;
+ if (*ep)
+ return -EINVAL;
+
*anint = rv;
return 0;
}
--
1.7.10
next reply other threads:[~2012-07-04 23:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 23:00 Eldad Zack [this message]
2012-07-04 23:00 ` [PATCH 2/2] sunrpc/cache.h: replace simple_strtoul Eldad Zack
2012-07-04 23:23 ` Joe Perches
2012-07-05 18:59 ` Eldad Zack
2012-07-04 23:59 ` J. Bruce Fields
2012-07-05 19:04 ` Eldad Zack
2012-07-05 19:13 ` J. Bruce Fields
2012-07-05 19:57 ` Eldad Zack
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=1341442827-21339-1-git-send-email-eldad@fogrefinery.com \
--to=eldad@fogrefinery.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.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