linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix style nits in atomicio.c
@ 2010-10-05 20:34 Jim Rees
       [not found] ` <20101005203400.GA16030-8f4Pc2RrbJmHXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Rees @ 2010-10-05 20:34 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs, peter honeyman

Signed-off-by: Jim Rees <rees@umich.edu>
---
 support/nfs/atomicio.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/support/nfs/atomicio.c b/support/nfs/atomicio.c
index 1fb1ff9..8db626e 100644
--- a/support/nfs/atomicio.c
+++ b/support/nfs/atomicio.c
@@ -28,23 +28,13 @@
 #include <unistd.h>
 #include <errno.h>
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif /* HAVE_CONFIG_H */
-
 /*
  * ensure all of data on socket comes through. f==read || f==write
  */
-ssize_t
-atomicio(
-	ssize_t (*f) (int, void*, size_t),
-	int fd,
-	void *_s,
-	size_t n)
+ssize_t atomicio(ssize_t(*f) (int, void *, size_t), int fd, void *_s, size_t n)
 {
 	char *s = _s;
-	ssize_t res;
-	size_t pos = 0;
+	ssize_t res, pos = 0;
 
 	while (n > pos) {
 		res = (f) (fd, s + pos, n - pos);
@@ -54,11 +44,11 @@ atomicio(
 				continue;
 		case 0:
 			if (pos != 0)
-				return (pos);
-			return (res);
+				return pos;
+			return res;
 		default:
 			pos += res;
 		}
 	}
-	return (pos);
+	return pos;
 }
-- 
1.7.0.4


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

* Re: [PATCH] fix style nits in atomicio.c
       [not found] ` <20101005203400.GA16030-8f4Pc2RrbJmHXe+LvDLADg@public.gmane.org>
@ 2010-10-13 14:22   ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2010-10-13 14:22 UTC (permalink / raw)
  To: Jim Rees; +Cc: linux-nfs, peter honeyman



On 10/05/2010 04:34 PM, Jim Rees wrote:
> Signed-off-by: Jim Rees <rees@umich.edu>
> ---
>  support/nfs/atomicio.c |   20 +++++---------------
>  1 files changed, 5 insertions(+), 15 deletions(-)
> 
Committed...

steved

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

end of thread, other threads:[~2010-10-13 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 20:34 [PATCH] fix style nits in atomicio.c Jim Rees
     [not found] ` <20101005203400.GA16030-8f4Pc2RrbJmHXe+LvDLADg@public.gmane.org>
2010-10-13 14:22   ` Steve Dickson

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).