(mc_setup_by_args): reduce variable scope into #ifdef to fix coverity finding.

Found by Coverity.
Coverity id #331837

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2022-02-25 19:11:42 +00:00 committed by Andrew Borodin
parent 5b4ec9b033
commit 1bdf814052
1 changed files with 3 additions and 3 deletions

View File

@ -770,16 +770,16 @@ mc_setup_by_args (int argc, char **argv, GError ** mcerror)
mc_global.tty.use_subshell = FALSE; mc_global.tty.use_subshell = FALSE;
#endif /* ENABLE_SUBSHELL */ #endif /* ENABLE_SUBSHELL */
#ifdef ENABLE_VFS_FTP
if (mc_args__netfs_logfile != NULL) if (mc_args__netfs_logfile != NULL)
{ {
vfs_path_t *vpath; vfs_path_t *vpath;
#ifdef ENABLE_VFS_FTP
vpath = vfs_path_from_str ("ftp://"); vpath = vfs_path_from_str ("ftp://");
mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile); mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile);
vfs_path_free (vpath, TRUE); vfs_path_free (vpath, TRUE);
#endif /* ENABLE_VFS_FTP */
(void) vpath;
} }
#endif /* ENABLE_VFS_FTP */
tmp = (argc > 0) ? argv[1] : NULL; tmp = (argc > 0) ? argv[1] : NULL;