From: Andrew Borodin Date: Tue, 1 Jan 2013 15:41:14 +0000 (+0400) Subject: (read_subshell_prompt): return gboolean instead of int. X-Git-Tag: 4.8.8~29^2~9 X-Git-Url: https://repo.or.cz/w/midnight-commander.git/commitdiff_plain/0e7810eb5fb8fd3ca450c78acae80c180912f2b1 (read_subshell_prompt): return gboolean instead of int. Signed-off-by: Andrew Borodin --- diff --git a/src/subshell.c b/src/subshell.c index 510cf4d27..01636b40c 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -981,7 +981,7 @@ invoke_subshell (const char *command, int how, vfs_path_t ** new_dir_vpath) /* --------------------------------------------------------------------------------------------- */ -int +gboolean read_subshell_prompt (void) { static int prompt_size = INITIAL_PROMPT_SIZE; @@ -1038,9 +1038,8 @@ read_subshell_prompt (void) subshell_prompt[prompt_pos] = '\0'; } - if (rc == 0 && bytes == 0) - return FALSE; - return TRUE; + + return (rc != 0 || bytes != 0); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/subshell.h b/src/subshell.h index b76708bf1..5775e3490 100644 --- a/src/subshell.h +++ b/src/subshell.h @@ -40,7 +40,7 @@ extern gboolean update_subshell_prompt; void init_subshell (void); int invoke_subshell (const char *command, int how, vfs_path_t ** new_dir); -int read_subshell_prompt (void); +gboolean read_subshell_prompt (void); void do_update_prompt (void); gboolean exit_subshell (void); void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt);