commit 31023f0f4d0b319c188ef81a2c3889003eba7810
parent e93cfd10c08fc61e1eb269d346cc137f83d4b66b
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 17 Apr 2007 18:12:19 +0000
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/trunk/nano@4075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -5,6 +5,8 @@
home directories, could be erroneously treated as users' home
directories (e.g. "~d/" would be treated as "~daemon/"). (DLR,
found by Justin Fletcher)
+ * files.c (input_tab): Don't bother checking if num_matches is
+ less than zero, as it's a size_t and hence unsigned. (DLR)
2007-04-16 David Lawrence Ramsey <pooka109@gmail.com>
diff --git 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;