From b3ecf2feaf96330e102e26a183f56c9973309373 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Fri, 17 Mar 2000 00:44:55 +0000 Subject: [PATCH] ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on failure. --- ext/standard/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } /* }}} */ -- 2.50.1