From 2eb9712cd044ec67ad65d1f653096cbe984d8efb Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 11 Apr 2017 13:01:32 +0100 Subject: [PATCH] is_context_available --- pattern.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pattern.c b/pattern.c index c8b745c16..f63ed260a 100644 --- a/pattern.c +++ b/pattern.c @@ -597,7 +597,7 @@ report_regerror(int regerr, regex_t *preg, BUFFER *err) return RANGE_E_SYNTAX; } -static int +static bool is_context_available(BUFFER *s, regmatch_t pmatch[], int kind, BUFFER *err) { char *context_loc = NULL; @@ -615,15 +615,15 @@ is_context_available(BUFFER *s, regmatch_t pmatch[], int kind, BUFFER *err) * Absolute patterns only need it if they contain a dot. */ context_loc = strpbrk(s->dptr+pmatch[0].rm_so, context_req_chars[kind]); if ((context_loc == NULL) || (context_loc >= &s->dptr[pmatch[0].rm_eo])) - return 1; + return true; /* We need a current message. Do we actually have one? */ if (Context && Context->menu) - return 1; + return true; /* Nope. */ strfcpy(err->data, _("No current message"), err->dsize); - return 0; + return false; } static int -- 2.49.0