Skip to content

Commit 954199c

Browse files
committed
More ZSTR() fixes
1 parent 1c307a8 commit 954199c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

ext/pdo/pdo_dbh.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static char *dsn_from_uri(char *uri, char *buf, size_t buflen TSRMLS_DC) /* {{{
189189

190190
stream = php_stream_open_wrapper(uri, "rb", REPORT_ERRORS, NULL);
191191
if (stream) {
192-
dsn = php_stream_get_line(stream, buf, buflen, NULL);
192+
dsn = php_stream_get_line(stream, ZSTR(buf), buflen, NULL);
193193
php_stream_close(stream);
194194
}
195195
return dsn;

ext/standard/exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int php_exec(int type, char *cmd, zval *array, zval *return_value TSRMLS_DC)
9292
if (type != 3) {
9393
b = buf;
9494

95-
while (php_stream_get_line(stream, b, EXEC_INPUT_BUF, &bufl)) {
95+
while (php_stream_get_line(stream, ZSTR(b), EXEC_INPUT_BUF, &bufl)) {
9696
/* no new line found, let's read some more */
9797
if (b[bufl - 1] != '\n' && !php_stream_eof(stream)) {
9898
if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) {

ext/standard/ftp_fopen_wrapper.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC)
7373
{
74-
while (php_stream_gets(stream, buffer, buffer_size-1) &&
74+
while (php_stream_gets(stream, ZSTR(buffer), buffer_size-1) &&
7575
!(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
7676
isdigit((int) buffer[2]) && buffer[3] == ' '));
7777
return strtol(buffer, NULL, 10);
@@ -595,7 +595,7 @@ static size_t php_ftp_dirstream_read(php_stream *stream, char *buf, size_t count
595595
return 0;
596596
}
597597

598-
if (!php_stream_get_line(innerstream, ent->d_name, sizeof(ent->d_name), &tmp_len)) {
598+
if (!php_stream_get_line(innerstream, ZSTR(ent->d_name), sizeof(ent->d_name), &tmp_len)) {
599599
return 0;
600600
}
601601

sapi/cli/php_cli.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ int main(int argc, char *argv[])
11461146
Z_LVAL_P(argi) = index;
11471147
INIT_PZVAL(argi);
11481148
zend_hash_update(&EG(symbol_table), "argi", sizeof("argi"), &argi, sizeof(zval *), NULL);
1149-
while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL, 0)) != NULL) {
1149+
while (exit_status == SUCCESS && (input=php_stream_gets(s_in_process, NULL_ZSTR, 0)) != NULL) {
11501150
len = strlen(input);
11511151
while (len-- && (input[len]=='\n' || input[len]=='\r')) {
11521152
input[len] = '\0';

0 commit comments

Comments
 (0)