diff --git a/ftpd.c b/ftpd.c index 0d5c54b..a172ec3 100644 --- a/ftpd.c +++ b/ftpd.c @@ -976,12 +976,12 @@ static void cmd_abrt(const char *arg, struct tcp_pcb *pcb, struct ftpd_msgstate static void cmd_type(const char *arg, struct tcp_pcb *pcb, struct ftpd_msgstate *fsm) { LWIP_DEBUGF(FTPD_DEBUG, ("Got TYPE -%s-\n", arg)); - + if(strcmp(arg, "I") != 0) { send_msg(pcb, fsm, msg502); return; } - + send_msg(pcb, fsm, msg200); } @@ -1241,7 +1241,7 @@ static err_t ftpd_msgsent(void *arg, struct tcp_pcb *pcb, u16_t len) ftpd_msgclose(pcb, fsm); return ERR_OK; } - + if (pcb->state <= ESTABLISHED) send_msgdata(pcb, fsm); return ERR_OK; } diff --git a/test-in-docker/src/main.c b/test-in-docker/src/main.c index 9d80b28..7b7b530 100644 --- a/test-in-docker/src/main.c +++ b/test-in-docker/src/main.c @@ -120,7 +120,7 @@ static err_t init_callback(struct netif* netif) { return ERR_OK; } -int main(size_t argc, char **argv) { +int main(int argc, char **argv) { pcap_t *pcap = pcap_open_live("eth0", 65536, 1, 100, NULL); char errbuf[PCAP_ERRBUF_SIZE]; int r = pcap_setnonblock(pcap, 1, errbuf); diff --git a/vfs.c b/vfs.c index f341efe..da8c2de 100644 --- a/vfs.c +++ b/vfs.c @@ -74,7 +74,7 @@ int vfs_stat(vfs_t* vfs, const char* filename, vfs_stat_t* st) { .tm_hour = (f.ftime >> 11) & 0x1f, .tm_mday = f.fdate & 0x1f, .tm_mon = (f.fdate >> 5) & 0xf, - .tm_year = 80 + (f.fdate >> 9) & 0x7f, + .tm_year = 80 + ((f.fdate >> 9) & 0x7f), }; st->st_mtime = mktime(&tm); return 0;