]> granicus.if.org Git - php/commitdiff
merge similar if conditions
authorAntony Dovgal <tony2001@php.net>
Fri, 19 Dec 2014 11:57:41 +0000 (14:57 +0300)
committerJulien Pauli <jpauli@php.net>
Wed, 13 May 2015 13:34:17 +0000 (15:34 +0200)
ext/pcntl/pcntl.c

index f152ad88146160e06627b703060779b93d04a5cf..bf2fcfe525fe5e903f119efc93d9f2a5ac683ec9 100644 (file)
@@ -639,9 +639,7 @@ PHP_FUNCTION(pcntl_waitpid)
                } else {
                        zend_hash_clean(Z_ARRVAL_P(z_rusage));
                }
-       }
 
-       if (z_rusage) {
                memset(&rusage, 0, sizeof(struct rusage));
                child_id = wait4((pid_t) pid, &status, options, &rusage);
        } else {
@@ -693,9 +691,7 @@ PHP_FUNCTION(pcntl_wait)
                } else {
                        zend_hash_clean(Z_ARRVAL_P(z_rusage));
                }
-       }
 
-       if (z_rusage) {
                memset(&rusage, 0, sizeof(struct rusage));
                child_id = wait3(&status, options, &rusage);
        } else if (options) {