This commit is contained in:
Your Name 2024-06-29 14:43:19 +03:00
parent ea661e7148
commit 5871a87dbd
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
CFLAGS?=-pedantic -O0 -s -Wall
CFLAGS?=-pedantic -O3 -s -Wall -Wextra
CC?=cc
all:

View File

@ -29,10 +29,10 @@ char *dir = ".";
char *prog_name;
int ifd;
int ifd_clients;
size_t ifd_clients;
int ofd;
int ofd_clients;
size_t ofd_clients;
enum {
OUTPUT,
@ -85,7 +85,7 @@ char *rand_string(void) {
if (res == NULL)
return NULL;
for (int i = 0; i < name_len; i++)
for (size_t i = 0; i < name_len; i++)
res[i] = abc[rand() % (sizeof(abc) - 1)];
res[name_len] = '\0';
@ -158,7 +158,7 @@ void upload(int cfd, pid_t par) {
break;
tbytes += rbytes;
if (tbytes / 1024 / 1024 >= max_size) {
if (tbytes / 1024 / 1024 >= (ssize_t)max_size) {
send_str(cfd, MSG2, sizeof(MSG2), WRITE);
break;
}