diff --git a/src/osdep/osdep.c b/src/osdep/osdep.c index 029b325c..7fed4598 100644 --- a/src/osdep/osdep.c +++ b/src/osdep/osdep.c @@ -164,10 +164,10 @@ set_cwd(char *path) if (path) while (chdir(path) && errno == EINTR); } -char * +const char * get_shell(void) { - char *shell = GETSHELL; + const char *shell = GETSHELL; if (!shell || !*shell) shell = DEFAULT_SHELL; diff --git a/src/osdep/osdep.h b/src/osdep/osdep.h index 2ec1e324..e4d1883b 100644 --- a/src/osdep/osdep.h +++ b/src/osdep/osdep.h @@ -70,7 +70,7 @@ void set_ip_tos_throughput(int socket); char *get_cwd(void); void set_cwd(char *); -char *get_shell(void); +const char *get_shell(void); #ifdef __cplusplus } diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index a69fc807..f0528823 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -277,7 +277,7 @@ assert_terminal_ptr_not_dangling(const struct terminal *suspect) static void exec_on_master_terminal(struct terminal *term, - char *path, int plen, + const char *path, int plen, const char *delete_, int dlen, term_exec_T fg) { @@ -320,7 +320,7 @@ exec_on_master_terminal(struct terminal *term, static void exec_on_slave_terminal( struct terminal *term, - char *path, int plen, + const char *path, int plen, const char *delete_, int dlen, term_exec_T fg) { @@ -338,7 +338,7 @@ exec_on_slave_terminal( struct terminal *term, } void -exec_on_terminal(struct terminal *term, char *path, +exec_on_terminal(struct terminal *term, const char *path, const char *delete_, term_exec_T fg) { if (path) { @@ -380,7 +380,7 @@ exec_on_terminal(struct terminal *term, char *path, void exec_shell(struct terminal *term) { - char *sh; + const char *sh; if (!can_open_os_shell(term->environment)) return; diff --git a/src/terminal/terminal.h b/src/terminal/terminal.h index 912cea50..36cb69d0 100644 --- a/src/terminal/terminal.h +++ b/src/terminal/terminal.h @@ -232,7 +232,7 @@ enum term_exec { typedef int term_exec_T; -void exec_on_terminal(struct terminal *, char *, const char *, term_exec_T); +void exec_on_terminal(struct terminal *, const char *, const char *, term_exec_T); void exec_shell(struct terminal *term); int set_terminal_title(struct terminal *, char *);