From: Tom Tromey Date: Sat, 20 Jan 2018 22:09:40 +0000 (-0700) Subject: fix possible infinite loop in find_filename_hash_slot X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d360e50e6b4aadf18d561f3c42cdf7084928a44;p=emacs.git fix possible infinite loop in find_filename_hash_slot --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 90332e76ad9..92cc190f3e6 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; } }