emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/etags_update_v2 0d360e5 5/8: fix possible infinite loop in find_


From: Dmitry Gutov
Subject: feature/etags_update_v2 0d360e5 5/8: fix possible infinite loop in find_filename_hash_slot
Date: Tue, 8 Dec 2020 16:48:02 -0500 (EST)

branch: feature/etags_update_v2
commit 0d360e50e6b4aadf18d561f3c42cdf7084928a44
Author: Tom Tromey <tom@tromey.com>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    fix possible infinite loop in find_filename_hash_slot
---
 lib-src/etags.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib-src/etags.c b/lib-src/etags.c
index 90332e7..92cc190 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -7714,8 +7714,7 @@ find_filename_hash_slot (const char *filename)
          || streq (filename_hash_table[index], filename))
        return &filename_hash_table[index];
 
-      /* Add 1 because, if VAL==0, we won't advance.  */
-      index = (index + val + 1) % filename_hash_size;
+      index = (index + 3) % filename_hash_size;
     }
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]