static int php_gziop_seek(php_stream *stream, off_t offset, int whence, off_t *newoffs TSRMLS_DC)
{
struct php_gz_stream_data_t *self = (struct php_gz_stream_data_t *) stream->abstract;
- int ret;
-
+
assert(self != NULL);
-
- ret = gzseek(self->gz_file, offset, whence);
- *newoffs = gztell(self->gz_file);
-
- return (ret < 0) ? -1 : 0;
+
+ *newoffs = gzseek(self->gz_file, offset, whence);
+
+ return (*newoffs < 0) ? -1 : 0;
}
static int php_gziop_close(php_stream *stream, int close_handle TSRMLS_DC)