Skip to content

Commit 96cf1b5

Browse files
committed
ext/ftp: Use size_t type instead of int type
1 parent 7fcdf1c commit 96cf1b5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/ftp/ftp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,12 @@ bool ftp_rmdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len)
573573
return true;
574574
}
575575

576-
bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len)
576+
bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const size_t filename_len)
577577
{
578578
char *buffer;
579579
size_t buffer_len;
580580

581-
if (ftp == NULL || filename_len <= 0) {
581+
if (ftp == NULL || filename_len == 0) {
582582
return false;
583583
}
584584

ext/ftp/ftp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ zend_string* ftp_mkdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len);
138138
bool ftp_rmdir(ftpbuf_t *ftp, const char *dir, const size_t dir_len);
139139

140140
/* Set permissions on a file */
141-
bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const int filename_len);
141+
bool ftp_chmod(ftpbuf_t *ftp, const int mode, const char *filename, const size_t filename_len);
142142

143143
/* Allocate space on remote server with ALLO command
144144
* Many servers will respond with 202 Allocation not necessary,

0 commit comments

Comments
 (0)