Skip to content

Commit 5c22b97

Browse files
committed
Use bool instead of int type
1 parent 425012b commit 5c22b97

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/standard/proc_open.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ PHP_FUNCTION(proc_get_status)
361361
int wstatus;
362362
pid_t wait_pid;
363363
#endif
364-
int running = 1, signaled = 0, stopped = 0;
364+
bool running = 1, signaled = 0, stopped = 0;
365365
int exitcode = -1, termsig = 0, stopsig = 0;
366366

367367
ZEND_PARSE_PARAMETERS_START(1, 1)
@@ -546,7 +546,7 @@ static zend_string *create_win_command_from_args(HashTable *args)
546546

547547
/* Get a boolean option from the `other_options` array which can be passed to `proc_open`.
548548
* (Currently, all options apply on Windows only.) */
549-
static int get_option(zval *other_options, char *opt_name)
549+
static bool get_option(zval *other_options, char *opt_name)
550550
{
551551
HashTable *opt_ary = Z_ARRVAL_P(other_options);
552552
zval *item = zend_hash_str_find_deref(opt_ary, opt_name, strlen(opt_name));
@@ -1024,11 +1024,11 @@ PHP_FUNCTION(proc_open)
10241024
char cur_cwd[MAXPATHLEN];
10251025
wchar_t *cmdw = NULL, *cwdw = NULL, *envpw = NULL;
10261026
size_t cmdw_len;
1027-
int suppress_errors = 0;
1028-
int bypass_shell = 0;
1029-
int blocking_pipes = 0;
1030-
int create_process_group = 0;
1031-
int create_new_console = 0;
1027+
bool suppress_errors = 0;
1028+
bool bypass_shell = 0;
1029+
bool blocking_pipes = 0;
1030+
bool create_process_group = 0;
1031+
bool create_new_console = 0;
10321032
#else
10331033
char **argv = NULL;
10341034
#endif

0 commit comments

Comments
 (0)