summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-10-30 20:43:45 +0100
committerAnatol Belski <ab@php.net>2018-10-30 20:43:45 +0100
commitee9d879f57258e1a0c8946c1eec70d20587d314b (patch)
tree56731c7bb3b004014fc7a2c462b45cd2e4a7ae9c /main
parent8827cc34cf8c77828330182ee1e6d0b9438d489c (diff)
downloadphp-git-ee9d879f57258e1a0c8946c1eec70d20587d314b.tar.gz
Fix error condition
Diffstat (limited to 'main')
-rw-r--r--main/streams/plain_wrapper.c4
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;