Coding style cleanup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 18:02:46 +0000 (14:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 18:02:46 +0000 (14:02 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/ust/share.h

index 7bdeb5d211786deff767ad5f5b7843be1a2f6486..cecfaa17045b5337b037d361c855580df229b79b 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2009  Pierre-Marc Fournier
+/*
+ * Copyright (C) 2009  Pierre-Marc Fournier
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -27,7 +28,8 @@
 
 #include <errno.h>
 
-/* This write is patient because it restarts if it was incomplete.
+/*
+ * This write is patient because it restarts if it was incomplete.
  */
 
 static __inline__ ssize_t patient_write(int fd, const void *buf, size_t count)
@@ -37,16 +39,16 @@ static __inline__ ssize_t patient_write(int fd, const void *buf, size_t count)
 
        for(;;) {
                result = write(fd, bufc, count);
-               if(result == -1 && errno == EINTR) {
+               if (result == -1 && errno == EINTR) {
                        continue;
                }
-               if(result <= 0) {
+               if (result <= 0) {
                        return result;
                }
                count -= result;
                bufc += result;
 
-               if(count == 0) {
+               if (count == 0) {
                        break;
                }
        }
@@ -61,21 +63,21 @@ static __inline__ ssize_t patient_send(int fd, const void *buf, size_t count, in
 
        for(;;) {
                result = send(fd, bufc, count, flags);
-               if(result == -1 && errno == EINTR) {
+               if (result == -1 && errno == EINTR) {
                        continue;
                }
-               if(result <= 0) {
+               if (result <= 0) {
                        return result;
                }
                count -= result;
                bufc += result;
 
-               if(count == 0) {
+               if (count == 0) {
                        break;
                }
        }
 
-       return bufc-(const char *)buf;
+       return bufc - (const char *) buf;
 }
 
 #endif /* UST_SHARE_H */
This page took 0.025858 seconds and 4 git commands to generate.