From: David Lawrence Ramsey Date: Tue, 17 Apr 2007 18:12:19 +0000 (+0000) Subject: in input_tab(), don't bother checking if num_matches is less than zero, X-Git-Tag: v2.0.5~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=175f27524b2c49c05661eabbe9a2a6e8fc8352cf;p=nano.git in input_tab(), don't bother checking if num_matches is less than zero, as it's a size_t and hence unsigned git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index b3dd7915..7f1ad0ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ CVS code - erroneously treated as users' home directories (e.g. "~d/" would be treated as "~daemon/"). (DLR, found by Justin Fletcher) + input_tab() + - Don't bother checking if num_matches is less than zero, as + it's a size_t and hence unsigned. (DLR) - doc/syntax/asm.nanorc, doc/syntax/c.nanorc, doc/syntax/sh.nanorc: - Copy the regex that highlights trailing whitespace from doc/syntax/java.nanorc to these files, as it's also useful in diff --git a/src/files.c b/src/files.c index bde29e11..d4c5995e 100644 --- a/src/files.c +++ b/src/files.c @@ -2254,7 +2254,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool matches = cwd_tab_completion(buf, allow_files, &num_matches, *place); - if (num_matches <= 0) + if (num_matches == 0) beep(); else { size_t match, common_len = 0;