Skip to content

Commit 2c3da76

Browse files
committed
Compare php_stream_ops pointer instead of label
1 parent c02bb26 commit 2c3da76

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

main/streams/cast.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ void php_stream_mode_sanitize_fdopen_fopencookie(php_stream *stream, char *resul
189189

190190
static inline bool is_stream_user_stream(const php_stream *stream)
191191
{
192-
return (strlen(stream->ops->label) == strlen("user-space"))
193-
&& strncmp(stream->ops->label, "user-space", strlen("user-space")) == 0;
192+
return stream->ops == &php_stream_userspace_ops;
194193
}
195194

196195
/* {{{ php_stream_cast */

0 commit comments

Comments
 (0)