Ticket #4270: mc-4270-filegui-fix-cid-331837.patch

File mc-4270-filegui-fix-cid-331837.patch, 1.1 KB (added by and, 10 months ago)
  • src/args.c

    From bcbca283588a5d14e187d9e33b80e877d2fa6ae2 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Fri, 25 Feb 2022 19:11:42 +0000
    Subject: [PATCH] (args.c) fix coverity finding #331837
    
    Reduce variable scope into #ifdef to fix coverity finding.
    
    Found by Coverity.
    Coverity id #331837
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/args.c | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/src/args.c b/src/args.c
    index e87579bab..3f98f9eba 100644
    a b mc_setup_by_args (int argc, char **argv, GError ** mcerror) 
    770770        mc_global.tty.use_subshell = FALSE; 
    771771#endif /* ENABLE_SUBSHELL */ 
    772772 
     773#ifdef ENABLE_VFS_FTP 
    773774    if (mc_args__netfs_logfile != NULL) 
    774775    { 
    775776        vfs_path_t *vpath; 
    776 #ifdef ENABLE_VFS_FTP 
    777777        vpath = vfs_path_from_str ("ftp://"); 
    778778        mc_setctl (vpath, VFS_SETCTL_LOGFILE, (void *) mc_args__netfs_logfile); 
    779779        vfs_path_free (vpath, TRUE); 
    780 #endif /* ENABLE_VFS_FTP */ 
    781         (void) vpath; 
    782780    } 
     781#endif /* ENABLE_VFS_FTP */ 
    783782 
    784783    tmp = (argc > 0) ? argv[1] : NULL; 
    785784