From: Jim Rees <rees@umich.edu>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org, peter honeyman <honey@citi.umich.edu>
Subject: [PATCH] fix style nits in atomicio.c
Date: Tue, 5 Oct 2010 16:34:00 -0400 [thread overview]
Message-ID: <20101005203400.GA16030@merit.edu> (raw)
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
next reply other threads:[~2010-10-05 20:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 20:34 Jim Rees [this message]
[not found] ` <20101005203400.GA16030-8f4Pc2RrbJmHXe+LvDLADg@public.gmane.org>
2010-10-13 14:22 ` [PATCH] fix style nits in atomicio.c Steve Dickson
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=20101005203400.GA16030@merit.edu \
--to=rees@umich.edu \
--cc=SteveD@redhat.com \
--cc=honey@citi.umich.edu \
--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;
as well as URLs for NNTP newsgroup(s).