emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/etags-update 72c8dee: fix possible infinite loop i


From: Tom Tromey
Subject: [Emacs-diffs] feature/etags-update 72c8dee: fix possible infinite loop in find_filename_hash_slot
Date: Sat, 20 Jan 2018 17:11:17 -0500 (EST)

branch: feature/etags-update
commit 72c8dee162db7cc4d6405d97a097875ff0cd2f85
Author: Tom Tromey <address@hidden>
Commit: Tom Tromey <address@hidden>

    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 f7632f3..982e3a0 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -7683,8 +7683,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]