Skip to content

Commit 994aa8c

Browse files
committed
fix ordering for gcc
1 parent e018a8e commit 994aa8c

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

main/streams/plain_wrapper.c

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,24 @@ static int php_stdiop_close(php_stream *stream, int close_handle)
520520
return ret;
521521
}
522522

523+
static int php_stdiop_flush(php_stream *stream)
524+
{
525+
php_stdio_stream_data *data = (php_stdio_stream_data*)stream->abstract;
526+
527+
assert(data != NULL);
528+
529+
/*
530+
* stdio buffers data in user land. By calling fflush(3), this
531+
* data is send to the kernel using write(2). fsync'ing is
532+
* something completely different.
533+
*/
534+
if (data->file) {
535+
return fflush(data->file);
536+
}
537+
return 0;
538+
}
539+
540+
523541
static int php_stdiop_sync(php_stream *stream)
524542
{
525543
php_stdio_stream_data *data = (php_stdio_stream_data*)stream->abstract;
@@ -541,23 +559,6 @@ static int php_stdiop_sync(php_stream *stream)
541559
return -1;
542560
}
543561

544-
static int php_stdiop_flush(php_stream *stream)
545-
{
546-
php_stdio_stream_data *data = (php_stdio_stream_data*)stream->abstract;
547-
548-
assert(data != NULL);
549-
550-
/*
551-
* stdio buffers data in user land. By calling fflush(3), this
552-
* data is send to the kernel using write(2). fsync'ing is
553-
* something completely different.
554-
*/
555-
if (data->file) {
556-
return fflush(data->file);
557-
}
558-
return 0;
559-
}
560-
561562
static int php_stdiop_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffset)
562563
{
563564
php_stdio_stream_data *data = (php_stdio_stream_data*)stream->abstract;

0 commit comments

Comments
 (0)