]> granicus.if.org Git - php/commitdiff
ftruncate returns 1 on success and 0 on failure instead of 0 on success and -1 on...
authorSterling Hughes <sterling@php.net>
Fri, 17 Mar 2000 00:44:55 +0000 (00:44 +0000)
committerSterling Hughes <sterling@php.net>
Fri, 17 Mar 2000 00:44:55 +0000 (00:44 +0000)
ext/standard/file.c

index 3796d5abbef7bff6798d1c32397c6691723c0cf9..7a7ab1fc4abff7fcdd4e6ebcc7e0f9c3daa67b33 100644 (file)
@@ -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);
 }
 /* }}} */