mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on failure.
This commit is contained in:
parent
cd83fb18c0
commit
b3ecf2feaf
@ -1477,7 +1477,7 @@ PHP_FUNCTION(ftruncate)
|
||||
convert_to_long_ex(size);
|
||||
|
||||
ret = ftruncate(fileno((FILE *)what), (*size)->value.lval);
|
||||
RETURN_LONG(ret);
|
||||
RETURN_LONG(ret + 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user