deheader cleanup
This commit is contained in:
1
rand.c
1
rand.c
@@ -1,7 +1,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
@@ -8,7 +7,6 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/epoll.h>
|
#include <sys/epoll.h>
|
||||||
@@ -334,7 +332,7 @@ static void conn_check(struct conn *conn) {
|
|||||||
socklen_t len = sizeof(error);
|
socklen_t len = sizeof(error);
|
||||||
assert(getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &error, &len) == 0);
|
assert(getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &error, &len) == 0);
|
||||||
if (error) {
|
if (error) {
|
||||||
fprintf(stderr, "\nConnection failed: %s\n", strerror(error));
|
fprintf(stderr, "\nConnection failed: %s", strerror(error));
|
||||||
shutdown_flag = true;
|
shutdown_flag = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -392,6 +390,8 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
file_open();
|
file_open();
|
||||||
|
|
||||||
|
stats_print();
|
||||||
|
|
||||||
epoll_fd = epoll_create1(0);
|
epoll_fd = epoll_create1(0);
|
||||||
assert(epoll_fd >= 0);
|
assert(epoll_fd >= 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user