Skip to content

Commit 7fb8db0

Browse files
committed
ext/ftp: Voidify ftp_close()
1 parent fabee4e commit 7fb8db0

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

ext/ftp/ftp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ ftp_open(const char *host, short port, zend_long timeout_sec)
161161
/* }}} */
162162

163163
/* {{{ ftp_close */
164-
ftpbuf_t*
165-
ftp_close(ftpbuf_t *ftp)
164+
void ftp_close(ftpbuf_t *ftp)
166165
{
167166
if (ftp == NULL) {
168-
return NULL;
167+
return;
169168
}
170169
#ifdef HAVE_FTP_SSL
171170
if (ftp->last_ssl_session) {
@@ -186,7 +185,6 @@ ftp_close(ftpbuf_t *ftp)
186185
}
187186
ftp_gc(ftp);
188187
efree(ftp);
189-
return NULL;
190188
}
191189
/* }}} */
192190

ext/ftp/ftp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int ftp_quit(ftpbuf_t *ftp);
103103
void ftp_gc(ftpbuf_t *ftp);
104104

105105
/* close the FTP connection and return NULL */
106-
ftpbuf_t* ftp_close(ftpbuf_t *ftp);
106+
void ftp_close(ftpbuf_t *ftp);
107107

108108
/* logs into the FTP server, returns true on success, false on error */
109109
int ftp_login(ftpbuf_t *ftp, const char *user, const size_t user_len, const char *pass, const size_t pass_len);

0 commit comments

Comments
 (0)