From f68b35b475a50e6c56495a7c9a8c0356da6bf1c2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 29 Aug 2011 13:46:32 +0400 Subject: [PATCH] (try_complete): fixed warinig: input_complete.c:874:26: warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wconstant-logical-operand] if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS) ^ ~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Andrew Borodin --- lib/widget/input_complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c index fe00b6aaa..e7350405a 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -871,7 +871,7 @@ try_complete (char *text, int *lc_start, int *lc_end, input_complete_t flags) q = strrchr (word, '$'); if (flags & INPUT_COMPLETE_HOSTNAMES) r = strrchr (word, '@'); - if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS) + if (q && q[1] == '(' && (flags & INPUT_COMPLETE_COMMANDS)) { if (q > p) p = str_get_next_char (q);