]> git.eshelyaron.com Git - emacs.git/commitdiff
fix possible infinite loop in find_filename_hash_slot
authorTom Tromey <tom@tromey.com>
Sat, 20 Jan 2018 22:09:40 +0000 (15:09 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 20 Jan 2018 22:11:10 +0000 (15:11 -0700)
lib-src/etags.c

index f7632f3275ca92ddddcbd421421b843d8278b776..982e3a0a1e5b1f6b965a982d625e5da9d599892e 100644 (file)
@@ -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;
     }
 }