diff --git a/fbflut.c b/fbflut.c index 1dfc41f..8b53f09 100644 --- a/fbflut.c +++ b/fbflut.c @@ -22,8 +22,8 @@ #include #include -#define ALLOW(syscall) \ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SYS_##syscall, 0, 1), \ +#define ALLOW(syscall) \ + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SYS_##syscall, 0, 1), \ BPF_STMT(BPF_RET + BPF_K, SECCOMP_RET_ALLOW) static int setup_seccomp() { @@ -113,18 +113,16 @@ void *handle_connection(void *socket_desc) { if (read_size == 36) { /* line too long, attempt parsing anyways */ read_to = (uintptr_t)client_message + read_size; - } else { - /* line partially read, try reading more */ - read_size = recv(sock, client_message, 36, - MSG_PEEK -#ifndef LOSSY - | MSG_WAITALL -#endif - ); - client_message[read_size] = '\0'; - read_to = - (uintptr_t)strchrnul(client_message, '\n'); } + /* line partially read, try reading more */ + read_size = recv(sock, client_message, 36, + MSG_PEEK +#ifndef LOSSY + | MSG_WAITALL +#endif + ); + client_message[read_size] = '\0'; + read_to = (uintptr_t)strchrnul(client_message, '\n'); } read_to = read_to - (uintptr_t)client_message; read_size = recv(sock, client_message, read_to + 1, 0);