]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Thu, 20 Feb 2003 00:34:24 +0000 (00:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 20 Feb 2003 00:34:24 +0000 (00:34 +0000)
ext/standard/exec.c

index 4b7bbfc699168acbb79628b222dee8844c8a2bd3..94455280487759a6a0a43966f160e19d89d6db21 100644 (file)
@@ -276,11 +276,12 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
                        RETVAL_STRINGL(buf, l, 1);
                }
        } else {
-               int b, i;
+               size_t b;
 
-               while ((b = fread(buf, 1, buflen, fp)) > 0) {
-                       for (i = 0; i < b; i++)
-                               if (output) (void)PUTC(buf[i]);
+               while ((b = fread(buf, buflen, 1, fp)) > 0) {
+                       if (output) {
+                               PHPWRITE(buf, b);
+                       }
                }
        }