From bfc06ff7448dd31e877babf4cf0782c85f06c611 Mon Sep 17 00:00:00 2001 From: fumiama Date: Wed, 19 May 2021 13:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=A0=BC=E5=BC=8F=E7=BB=9F?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + client.c | 2 +- server.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a967c2e..4dd132e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build .vscode .vscode/settings.json +.DS_Store \ No newline at end of file diff --git a/client.c b/client.c index 727ddc4..b90aac7 100644 --- a/client.c +++ b/client.c @@ -90,7 +90,7 @@ int main(int argc,char *argv[]) { //usage: ./client host port else puts("Send file error."); #endif fclose(fp); - printf("Send count:%lld\n", len); + printf("Send count:%u\n", len); } else puts("Open file error!"); } else { send(sockfd, buf, strlen(buf), 0); diff --git a/server.c b/server.c index 5bd752a..a1c617a 100644 --- a/server.c +++ b/server.c @@ -152,7 +152,7 @@ int send_all(THREADTIMER *timer) { send_data(timer->accept_fd, timer->data, head_len); re = sendfile(timer->accept_fd, fileno(fp), &len, file_size) >= 0; #endif - printf("Send %lld bytes.\n", len); + printf("Send %u bytes.\n", len); close_dict(); timer->is_open = 0; }