From e0fab690cccb15ba40e4c08795aa4b452e3dc659 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 17 Mar 2019 19:04:18 +0100 Subject: [PATCH] tweaks: don't pass a pointer when a boolean is expected For some reason, when configured with --with-slang, some extra compiler warnings are enabled that are not enabled by --extra-warnings. :| --- src/cut.c | 4 ++-- src/text.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cut.c b/src/cut.c index 7fbd6669..a722fc87 100644 --- a/src/cut.c +++ b/src/cut.c @@ -384,7 +384,7 @@ void do_cut_text_void(void) openfile->current_undo->mark_begin_lineno != openfile->current->lineno || !keep_cutbuffer) add_undo(CUT); - do_cut_text(FALSE, openfile->mark, FALSE, FALSE); + do_cut_text(FALSE, openfile->mark != NULL, FALSE, FALSE); update_undo(CUT); #else if (is_cuttable(FALSE)) @@ -460,7 +460,7 @@ void zap_text(void) cutbuffer = openfile->current_undo->cutbuffer; cutbottom = openfile->current_undo->cutbottom; - do_cut_text(FALSE, openfile->mark, FALSE, TRUE); + do_cut_text(FALSE, openfile->mark != NULL, FALSE, TRUE); update_undo(ZAP); diff --git a/src/text.c b/src/text.c index 9ce977c6..fcd81134 100644 --- a/src/text.c +++ b/src/text.c @@ -1039,7 +1039,7 @@ bool execute_command(const char *command) openfile->current_x = 0; } add_undo(CUT); - do_cut_text(FALSE, openfile->mark, openfile->mark == NULL, FALSE); + do_cut_text(FALSE, openfile->mark != NULL, openfile->mark == NULL, FALSE); update_undo(CUT); }