From 81919bab77832807a83abdc007ab726f71033895 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 5 Dec 2023 22:21:00 +0100 Subject: [PATCH] Struct-pack stream-related data in ftpbuf --- ext/ftp/ftp.c | 2 +- ext/ftp/ftp.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index ab955b7e56d55..849ada29fd3ec 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -2141,7 +2141,7 @@ ftp_nb_continue_read(ftpbuf_t *ftp) { databuf_t *data = NULL; char *ptr; - int lastch; + char lastch; size_t rcvd; ftptype_t type; diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index 5e96351ebdaee..94abc588ca857 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -70,18 +70,18 @@ typedef struct ftpbuf int autoseek; /* User configurable autoseek flag */ int usepasvaddress; /* Use the address returned by the pasv command */ - int nb; /* "nonblocking" transfer in progress */ databuf_t *data; /* Data connection for "nonblocking" transfers */ php_stream *stream; /* output stream for "nonblocking" transfers */ - int lastch; /* last char of previous call */ - int direction; /* recv = 0 / send = 1 */ - int closestream;/* close or not close stream */ + bool nb; /* "nonblocking" transfer in progress */ + char lastch; /* last char of previous call */ + bool direction; /* recv = 0 / send = 1 */ + bool closestream;/* close or not close stream */ #ifdef HAVE_FTP_SSL - int use_ssl; /* enable(1) or disable(0) ssl */ - int use_ssl_for_data; /* en/disable ssl for the dataconnection */ - int old_ssl; /* old mode = forced data encryption */ + bool use_ssl; /* enable(1) or disable(0) ssl */ + bool use_ssl_for_data; /* en/disable ssl for the dataconnection */ + bool old_ssl; /* old mode = forced data encryption */ + bool ssl_active; /* ssl active on control conn */ SSL *ssl_handle; /* handle for control connection */ - int ssl_active; /* ssl active on control conn */ SSL_SESSION *last_ssl_session; /* last negotiated session */ #endif