ext/ftp: Use size_t type instead of int type

This commit is contained in:
Gina Peter Banyard 2025-04-03 20:17:13 +01:00
parent 7fcdf1cfa2
commit 96cf1b5a9f
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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,