public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sunrpc/cache.h: fix coding style
@ 2012-07-04 23:00 Eldad Zack
  2012-07-04 23:00 ` [PATCH 2/2] sunrpc/cache.h: replace simple_strtoul Eldad Zack
  0 siblings, 1 reply; 8+ messages in thread
From: Eldad Zack @ 2012-07-04 23:00 UTC (permalink / raw)
  To: Trond Myklebust, J. Bruce Fields; +Cc: linux-nfs, linux-kernel, Eldad Zack

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-05 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-04 23:00 [PATCH 1/2] sunrpc/cache.h: fix coding style Eldad Zack
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox