diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index ffe955766bc..39555d8c7e3 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -573,12 +573,12 @@ bool ftp_rmdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len) return true; } -bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len) +bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const size_t filename_len) { char *buffer; size_t buffer_len; - if (ftp == NULL || filename_len <= 0) { + if (ftp == NULL || filename_len == 0) { return false; } diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index 0e73ee30850..5f01f202b8e 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -138,7 +138,7 @@ zend_string* ftp_mkdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len); bool ftp_rmdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len); /* Set permissions on a file */ -bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len); +bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const size_t filename_len); /* Allocate space on remote server with ALLO command * Many servers will respond with 202 Allocation not necessary,