Skip to content

Commit 7bf79ab

Browse files
Make spl_filesystem_dir_read() return void (#19419)
1 parent 7b44bfd commit 7bf79ab

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/spl/spl_directory.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,19 +260,16 @@ static zend_result spl_filesystem_object_get_file_name(spl_filesystem_object *in
260260
return SUCCESS;
261261
} /* }}} */
262262

263-
/* TODO Make void or have callers check return value */
264-
static bool spl_filesystem_dir_read(spl_filesystem_object *intern) /* {{{ */
263+
static void spl_filesystem_dir_read(spl_filesystem_object *intern) /* {{{ */
265264
{
266265
if (intern->file_name) {
267266
/* invalidate */
268267
zend_string_release(intern->file_name);
269268
intern->file_name = NULL;
270269
}
270+
271271
if (!intern->u.dir.dirp || !php_stream_readdir(intern->u.dir.dirp, &intern->u.dir.entry)) {
272272
intern->u.dir.entry.d_name[0] = '\0';
273-
return 0;
274-
} else {
275-
return 1;
276273
}
277274
}
278275
/* }}} */

0 commit comments

Comments
 (0)