summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2000-03-17 00:44:55 +0000
committerSterling Hughes <sterling@php.net>2000-03-17 00:44:55 +0000
commitb3ecf2feaf96330e102e26a183f56c9973309373 (patch)
treeae61c2985c014e385e904b77ffe2399c11904008
parentcd83fb18c0e957a6ddc30053452f40bd7ac3f333 (diff)
downloadphp-git-b3ecf2feaf96330e102e26a183f56c9973309373.tar.gz
ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on failure.
-rw-r--r--ext/standard/file.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/* }}} */