]> git.wh0rd.org Git - nano.git/commitdiff
in input_tab(), don't bother checking if num_matches is less than zero,
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 17 Apr 2007 18:12:19 +0000 (18:12 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 17 Apr 2007 18:12:19 +0000 (18:12 +0000)
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

ChangeLog
src/files.c

index f6dbc3eec9246b85f9758f5081cbabf515b55550..63ce0f6ed0f38a4933a04c4f0a74790f317da3ea 100644 (file)
--- 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>
 
index bde29e1178999acae76b44b0ed1bc3f3b51009b0..d4c5995e4707a8760f0cfea09a4bde03975044b5 100644 (file)
@@ -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;