Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit aa4d89f

Browse files
committed
(init_subshell_child): join, constify and mark as unused chdir return value
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
1 parent 8444431 commit aa4d89f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/subshell/common.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,8 @@ init_subshell_child (const char *pty_name)
300300

301301
// It simplifies things to change to our home directory here,
302302
// and the user's startup file may do a 'cd' command anyway
303-
{
304-
int ret;
305-
306-
ret = chdir (mc_config_get_home_dir ()); // FIXME? What about when we re-run the subshell?
307-
(void) ret;
308-
}
303+
// FIXME? What about when we re-run the subshell?
304+
MC_UNUSED const int ret_chdir = chdir (mc_config_get_home_dir ());
309305

310306
// Set MC_SID to prevent running one mc from another
311307
mc_sid = getsid (0);

0 commit comments

Comments
 (0)