diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-07-22 03:20:44 +0900 |
---|---|---|
committer | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-08-05 00:36:26 +0900 |
commit | 86f13970718ef5e0758ac4edfe7da2c354d19668 (patch) | |
tree | 5b70cbda20b2e50efc7eb1e63f16f0e8d57a905f /lib/file-util.c | |
parent | 079a02e20320e8018d1b2c879c759e4b5c9d30fb (diff) |
Reformat code
The librefop define the coding style using clang-format.
This patch reformat code using clang-format.
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Change-Id: I6f6647317f2916c583ca68e1259da2e08a989657
Diffstat (limited to 'lib/file-util.c')
-rw-r--r-- | lib/file-util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/file-util.c b/lib/file-util.c index a45c946..652cfd3 100644 --- a/lib/file-util.c +++ b/lib/file-util.c @@ -6,9 +6,9 @@ */ #include "file-util.h" +#include <errno.h> #include <stdint.h> #include <unistd.h> -#include <errno.h> /** * INTR safe read @@ -16,11 +16,11 @@ */ ssize_t safe_read(int fd, void *buf, size_t count) { - ssize_t size = 0,ressize = 0; + ssize_t size = 0, ressize = 0; size_t reqsize = 0; uint8_t *pbuf = NULL; - pbuf = (uint8_t*)buf; + pbuf = (uint8_t *) buf; reqsize = count; do { @@ -36,7 +36,7 @@ ssize_t safe_read(int fd, void *buf, size_t count) pbuf += size; ressize += size; - } while((ressize < reqsize) && (size != 0)); + } while ((ressize < reqsize) && (size != 0)); return ressize; } @@ -47,11 +47,11 @@ ssize_t safe_read(int fd, void *buf, size_t count) */ ssize_t safe_write(int fd, void *buf, size_t count) { - ssize_t size = 0,ressize = 0; + ssize_t size = 0, ressize = 0; size_t reqsize = 0; uint8_t *pbuf = NULL; - pbuf = (uint8_t*)buf; + pbuf = (uint8_t *) buf; reqsize = count; do { @@ -67,7 +67,7 @@ ssize_t safe_write(int fd, void *buf, size_t count) pbuf += size; ressize += size; - } while((ressize < reqsize) && (size != 0)); + } while ((ressize < reqsize) && (size != 0)); return ressize; } |