X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fust%2Fshare.h;h=cecfaa17045b5337b037d361c855580df229b79b;hb=d4419b81b243bc3a6bdd4a09b3ca2216d044a1c7;hp=7bdeb5d211786deff767ad5f5b7843be1a2f6486;hpb=1dbfff0c0126804b07e9c11ba2307f65a95a650b;p=lttng-ust.git diff --git a/include/ust/share.h b/include/ust/share.h index 7bdeb5d2..cecfaa17 100644 --- a/include/ust/share.h +++ b/include/ust/share.h @@ -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 -/* 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 */