com php-src: Minor Coverity tweaks: ext/ftp/ftp.c
| From: | Rasmus Lerdorf | Date: | Sun, 20 Oct 2013 15:55:48 +0000 |
| Subject: | com php-src: Minor Coverity tweaks: ext/ftp/ftp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73744@lists.php.net to get a copy of this message | ||
Commit: 1494298231072d5991e76db5ef25f20e81018106
Author: Rasmus Lerdorf <rasmus@lerdorf.com> Sun, 20 Oct 2013 08:55:48 -0700
Parents: 9976b5cd7f36d90b49d1dcf58ec6497f0e592b7d
Branches: PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1494298231072d5991e76db5ef25f20e81018106
Log:
Minor Coverity tweaks
Changed paths:
M ext/ftp/ftp.c
Diff:
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index 58d3c2e..4da8d60 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -1643,7 +1643,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
if (ftp->resp == 226) {
ftp->data = data_close(ftp, data);
php_stream_close(tmpstream);
- return ecalloc(1, sizeof(char**));
+ return ecalloc(1, sizeof(char*));
}
/* pull data buffer into tmpfile */
@@ -1671,11 +1671,11 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path TSRMLS_DC)
}
}
- ftp->data = data = data_close(ftp, data);
+ ftp->data = data_close(ftp, data);
php_stream_rewind(tmpstream);
- ret = safe_emalloc((lines + 1), sizeof(char**), size * sizeof(char*));
+ ret = safe_emalloc((lines + 1), sizeof(char*), size * sizeof(char*));
entry = ret;
text = (char*) (ret + lines + 1);