summaryrefslogtreecommitdiff
path: root/src/ndelay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ndelay.c')
-rw-r--r--src/ndelay.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ndelay.c b/src/ndelay.c
index f4b5eb8..8f6b5a9 100644
--- a/src/ndelay.c
+++ b/src/ndelay.c
@@ -1,7 +1,8 @@
-#include <sys/types.h>
-#include <fcntl.h>
#include "ndelay.h"
+#include <fcntl.h>
+#include <sys/types.h>
+
/**
@file ndelay.c
@author djb
@@ -10,15 +11,15 @@
*/
#ifndef O_NONBLOCK
-#define O_NONBLOCK O_NDELAY
+ #define O_NONBLOCK O_NDELAY
#endif
int ndelay_on(int fd)
{
- return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK);
+ return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
}
int ndelay_off(int fd)
{
- return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK);
+ return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK);
}