From 7369505397cdfddf0883e2c24e1652df8bd488fe Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 16 Dec 2022 13:53:35 +0800 Subject: Refactor file structure --- util.c | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 util.c (limited to 'util.c') diff --git a/util.c b/util.c deleted file mode 100644 index b4053fd..0000000 --- a/util.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include -#include -#include - -#include "util.h" -#include "constant.h" - -void panic(const char *msg) -{ - perror(msg); - exit(EXIT_FAILURE); -} - -int setblocking(int fd, bool blocking) -{ - u_long mode = blocking ? 0 : 1; - if (ioctl(fd, FIONBIO, &mode) == -1) - return ERROR; - - return OK; -} -- cgit v1.2.3