summaryrefslogtreecommitdiff
path: root/src/open.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 14:41:53 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 14:41:53 +0200
commit5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (patch)
tree684758441f5b431d0008253243034b6a4a29417c /src/open.c
parent249866e3d1e11dc72eaa1305f4bb479ded92ef38 (diff)
initial clang-format
Diffstat (limited to 'src/open.c')
-rw-r--r--src/open.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/open.c b/src/open.c
index c430698..3e00adb 100644
--- a/src/open.c
+++ b/src/open.c
@@ -1,7 +1,8 @@
-#include <sys/types.h>
-#include <fcntl.h>
#include "open.h"
+#include <fcntl.h>
+#include <sys/types.h>
+
/**
@file open.c
@author djb
@@ -10,16 +11,26 @@
*/
int open_append(const char *fn)
-{ return open(fn,O_WRONLY | O_NDELAY | O_APPEND | O_CREAT,0600); }
+{
+ return open(fn, O_WRONLY | O_NDELAY | O_APPEND | O_CREAT, 0600);
+}
int open_excl(const char *fn)
-{ return open(fn,O_WRONLY | O_EXCL | O_CREAT,0644); }
+{
+ return open(fn, O_WRONLY | O_EXCL | O_CREAT, 0644);
+}
int open_read(const char *fn)
-{ return open(fn,O_RDONLY | O_NDELAY); }
+{
+ return open(fn, O_RDONLY | O_NDELAY);
+}
int open_trunc(const char *fn)
-{ return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); }
+{
+ return open(fn, O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);
+}
int open_write(const char *fn)
-{ return open(fn,O_WRONLY | O_NDELAY); }
+{
+ return open(fn, O_WRONLY | O_NDELAY);
+}