Skip to content

Commit

Permalink
viewer: type accuracy related to the WView::locked flag.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Borodin <[email protected]>
  • Loading branch information
aborodin committed Dec 28, 2024
1 parent c1effaf commit 8784912
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/viewer/actions_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mcview_handle_editkey (WView *view, int key)
if ((view->filename_vpath != NULL)
&& (*(vfs_path_get_last_path_str (view->filename_vpath)) != '\0')
&& (view->change_list == NULL))
view->locked = lock_file (view->filename_vpath);
view->locked = lock_file (view->filename_vpath) != 0;

if (node == NULL)
{
Expand Down
4 changes: 2 additions & 2 deletions src/viewer/hex.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ mcview_hexedit_save_changes (WView *view)
view->change_list = NULL;

if (view->locked)
view->locked = unlock_file (view->filename_vpath);
view->locked = unlock_file (view->filename_vpath) != 0;

if (mc_close (fp) == -1)
message (D_ERROR, _("Save file"),
Expand Down Expand Up @@ -456,7 +456,7 @@ mcview_hexedit_free_change_list (WView *view)
view->change_list = NULL;

if (view->locked)
view->locked = unlock_file (view->filename_vpath);
view->locked = unlock_file (view->filename_vpath) != 0;

view->dirty++;
}
Expand Down

0 comments on commit 8784912

Please sign in to comment.