]> granicus.if.org Git - php/commitdiff
- Fixed bug #49132 (posix_times returns false without error)
authorFelipe Pena <felipe@php.net>
Sat, 1 Aug 2009 18:22:31 +0000 (18:22 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 1 Aug 2009 18:22:31 +0000 (18:22 +0000)
  patch by: phpbugs at gunnu dot us

ext/posix/posix.c

index 23a8cb2400046fa583b2f54c50627f6be0c0bd24..0230af73df92cb273af0c164812ad26d4db98b90 100644 (file)
@@ -684,7 +684,7 @@ PHP_FUNCTION(posix_times)
 
        PHP_POSIX_NO_ARGS;
 
-       if((ticks = times(&t)) < 0) {
+       if ((ticks = times(&t)) == -1) {
                POSIX_G(last_error) = errno;
                RETURN_FALSE;
        }