From a9501d10847d7993fad2e0778fe9c11317b4f7be Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Thu, 1 Dec 2022 23:20:33 +0800 Subject: Simplify logic by structure --- client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index 9e3a421..0b9cbfe 100644 --- a/client.c +++ b/client.c @@ -6,7 +6,7 @@ #include #include -#include "common.h" +#include "util.h" int main() @@ -24,7 +24,7 @@ main() if (connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) == -1) panic("socket connect error"); - while (true) { + for (;;) { char buf[1024]; bzero(&buf, sizeof(buf)); scanf("%s", buf); -- cgit v1.2.3