@@ -234,7 +234,7 @@ static void print_extensions(void) /* {{{ */
234
234
#define STDERR_FILENO 2
235
235
#endif
236
236
237
- static inline int sapi_cli_select (php_socket_t fd )
237
+ static inline bool sapi_cli_select (php_socket_t fd )
238
238
{
239
239
fd_set wfd ;
240
240
struct timeval tv ;
@@ -572,7 +572,7 @@ static void cli_register_file_handles(bool no_close) /* {{{ */
572
572
static const char * param_mode_conflict = "Either execute direct code, process stdin or use a file.\n" ;
573
573
574
574
/* {{{ cli_seek_file_begin */
575
- static int cli_seek_file_begin (zend_file_handle * file_handle , char * script_file )
575
+ static zend_result cli_seek_file_begin (zend_file_handle * file_handle , char * script_file )
576
576
{
577
577
FILE * fp = VCWD_FOPEN (script_file , "rb" );
578
578
if (!fp ) {
@@ -609,9 +609,9 @@ static int do_cli(int argc, char **argv) /* {{{ */
609
609
char * exec_direct = NULL , * exec_run = NULL , * exec_begin = NULL , * exec_end = NULL ;
610
610
char * arg_free = NULL , * * arg_excp = & arg_free ;
611
611
char * script_file = NULL , * translated_path = NULL ;
612
- int interactive = 0 ;
612
+ bool interactive = false ;
613
613
const char * param_error = NULL ;
614
- int hide_argv = 0 ;
614
+ bool hide_argv = false ;
615
615
int num_repeats = 1 ;
616
616
pid_t pid = getpid ();
617
617
@@ -698,7 +698,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
698
698
break ;
699
699
}
700
700
701
- interactive = 1 ;
701
+ interactive = true ;
702
702
}
703
703
break ;
704
704
@@ -818,7 +818,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
818
818
zend_load_extension (php_optarg );
819
819
break ;
820
820
case 'H' :
821
- hide_argv = 1 ;
821
+ hide_argv = true ;
822
822
break ;
823
823
case 10 :
824
824
behavior = PHP_MODE_REFLECTION_FUNCTION ;
@@ -894,7 +894,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
894
894
}
895
895
if (script_file ) {
896
896
virtual_cwd_activate ();
897
- if (cli_seek_file_begin (& file_handle , script_file ) != SUCCESS ) {
897
+ if (cli_seek_file_begin (& file_handle , script_file ) == FAILURE ) {
898
898
goto err ;
899
899
} else {
900
900
char real_path [MAXPATHLEN ];
@@ -1022,7 +1022,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
1022
1022
zend_eval_string_ex (exec_run , NULL , "Command line run code" , 1 );
1023
1023
} else {
1024
1024
if (script_file ) {
1025
- if (cli_seek_file_begin (& file_handle , script_file ) != SUCCESS ) {
1025
+ if (cli_seek_file_begin (& file_handle , script_file ) == FAILURE ) {
1026
1026
EG (exit_status ) = 1 ;
1027
1027
} else {
1028
1028
CG (skip_shebang ) = 1 ;
0 commit comments