diff options
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index d8e1f517b4..fca245e027 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -872,13 +872,13 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void sz.HighPart = 0; sz.LowPart = new_size; #endif - if (INVALID_SET_FILE_POINTER == SetFilePointerEx(h, sz, NULL, FILE_BEGIN) && NO_ERROR != GetLastError()) { + if (!SetFilePointerEx(h, sz, NULL, FILE_BEGIN)) { return PHP_STREAM_OPTION_RETURN_ERR; } if (0 == SetEndOfFile(h)) { return PHP_STREAM_OPTION_RETURN_ERR; } - if (INVALID_SET_FILE_POINTER == SetFilePointerEx(h, old_sz, NULL, FILE_BEGIN) && NO_ERROR != GetLastError()) { + if (!SetFilePointerEx(h, old_sz, NULL, FILE_BEGIN)) { return PHP_STREAM_OPTION_RETURN_ERR; } return PHP_STREAM_OPTION_RETURN_OK; |