From: Sterling Hughes Date: Fri, 17 Mar 2000 00:44:55 +0000 (+0000) Subject: ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on... X-Git-Tag: PHP-4.0-RC1~101 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3ecf2feaf96330e102e26a183f56c9973309373;p=php ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on failure. --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 3796d5abbe..7a7ab1fc4a 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -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); } /* }}} */