This repository was archived by the owner on Feb 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-15
lines changed
Expand file tree Collapse file tree 4 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -1831,7 +1831,7 @@ do_nc (void)
18311831
18321832 // widget_destroy destroys even current_panel->cwd_vpath, so we have to save a copy :)
18331833 if (mc_args__last_wd_file != NULL && vfs_current_is_local ())
1834- last_wd_string = g_strdup (vfs_path_as_str (current_panel -> cwd_vpath ));
1834+ last_wd_str = g_strdup (vfs_path_as_str (current_panel -> cwd_vpath ));
18351835
18361836 // don't handle VFS timestamps for dirs opened in panels
18371837 mc_event_destroy (MCEVENT_GROUP_CORE , "vfs_timestamp" );
Original file line number Diff line number Diff line change @@ -498,23 +498,19 @@ main (int argc, char *argv[])
498498 if (mc_global .tty .console_flag != '\0' )
499499 handle_console (CONSOLE_DONE );
500500
501- if (mc_global .mc_run_mode == MC_RUN_FULL && mc_args__last_wd_file != NULL
502- && last_wd_string != NULL && !print_last_revert )
501+ if (mc_global .mc_run_mode == MC_RUN_FULL && mc_args__last_wd_file != NULL && last_wd_str != NULL
502+ && !print_last_revert )
503503 {
504- int last_wd_fd ;
505-
506- last_wd_fd = open (mc_args__last_wd_file , O_WRONLY | O_CREAT | O_TRUNC , S_IRUSR | S_IWUSR );
504+ const int last_wd_fd =
505+ open (mc_args__last_wd_file , O_WRONLY | O_CREAT | O_TRUNC , S_IRUSR | S_IWUSR );
507506 if (last_wd_fd != -1 )
508507 {
509- ssize_t ret1 ;
510- int ret2 ;
511- ret1 = write (last_wd_fd , last_wd_string , strlen (last_wd_string ));
512- ret2 = close (last_wd_fd );
513- (void ) ret1 ;
514- (void ) ret2 ;
508+ MC_UNUSED const ssize_t ret1 = write (last_wd_fd , last_wd_str , strlen (last_wd_str ));
509+ MC_UNUSED const int ret2 = close (last_wd_fd );
515510 }
516511 }
517- g_free (last_wd_string );
512+
513+ g_free (last_wd_str );
518514
519515 mc_shell_deinit ();
520516
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ char *spell_language = NULL;
196196char * saved_other_dir = NULL ;
197197
198198/* If set, then print to the given file the last directory we were at */
199- char * last_wd_string = NULL ;
199+ char * last_wd_str = NULL ;
200200
201201/* Set when main loop should be terminated */
202202int quit = 0 ;
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ extern char *spell_language;
125125extern char * saved_other_dir ;
126126
127127/* If set, then print to the given file the last directory we were at */
128- extern char * last_wd_string ;
128+ extern char * last_wd_str ;
129129
130130extern int quit ;
131131/* Set to TRUE to suppress printing the last directory */
You can’t perform that action at this time.
0 commit comments