summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xutils.c4
-rw-r--r--xutils.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/xutils.c b/xutils.c
index 019c445..60b598c 100644
--- a/xutils.c
+++ b/xutils.c
@@ -169,13 +169,11 @@ void set_sock_uncork(int fd, int udp)
set_tcp_uncork(fd);
}
-int set_nonblocking(int fd)
+void set_nonblocking(int fd)
{
int ret = fcntl(fd, F_SETFL, fcntl(fd, F_GETFD, 0) | O_NONBLOCK);
if (unlikely(ret < 0))
panic("Cannot fcntl!\n");
-
- return 0;
}
int set_nonblocking_sloppy(int fd)
diff --git a/xutils.h b/xutils.h
index d1835e4..38c8da4 100644
--- a/xutils.h
+++ b/xutils.h
@@ -46,7 +46,7 @@ extern void device_set_flags(const char *ifname, const short flags);
extern void drop_privileges(bool enforce, uid_t uid, gid_t gid);
extern void xlockme(void);
extern void xunlockme(void);
-extern int set_nonblocking(int fd);
+extern void set_nonblocking(int fd);
extern int set_nonblocking_sloppy(int fd);
extern int set_reuseaddr(int fd);
extern void set_sock_prio(int fd, int prio);