From a92b041dc4b003c0b3fd3eb7195fa56e35529d25 Mon Sep 17 00:00:00 2001 From: Michael Theall Date: Wed, 3 Feb 2016 13:56:47 -0600 Subject: [PATCH] File size is off_t which is actually signed --- source/ftp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ftp.c b/source/ftp.c index e07429c..f65fab1 100644 --- a/source/ftp.c +++ b/source/ftp.c @@ -1897,7 +1897,7 @@ list_transfer(ftp_session_t *session) /* copy to the session buffer to send */ session->buffersize = sprintf(session->buffer, - "%crwxrwxrwx 1 3DS 3DS %llu ", + "%crwxrwxrwx 1 3DS 3DS %lld ", S_ISREG(st.st_mode) ? '-' : S_ISDIR(st.st_mode) ? 'd' : S_ISLNK(st.st_mode) ? 'l' : @@ -1905,7 +1905,7 @@ list_transfer(ftp_session_t *session) S_ISBLK(st.st_mode) ? 'b' : S_ISFIFO(st.st_mode) ? 'p' : S_ISSOCK(st.st_mode) ? 's' : '?', - (unsigned long long)st.st_size); + (signed long long)st.st_size); t_mtime = mtime; tm = gmtime(&t_mtime); @@ -2275,8 +2275,8 @@ ftp_xfer_dir(ftp_session_t *session, /* copy to the session buffer to send */ session->buffersize = sprintf(session->buffer, - "-rwxrwxrwx 1 3DS 3DS %llu Jan 1 1970 ", - (unsigned long long)st.st_size); + "-rwxrwxrwx 1 3DS 3DS %lld Jan 1 1970 ", + (signed long long)st.st_size); if(session->buffersize + len + 2 > sizeof(session->buffer)) { /* buffer will overflow */