merge trunk
[bpt/emacs.git] / src / profiler.c
index f6503cf..0a0a4d0 100644 (file)
@@ -55,7 +55,7 @@ make_log (int heap_size, int max_stack_depth)
   /* What is special about our hash-tables is that the keys are pre-filled
      with the vectors we'll put in them.  */
   int i = ASIZE (h->key_and_value) / 2;
-  while (0 < i)
+  while (i > 0)
     set_hash_key_slot (h, --i,
                       Fmake_vector (make_number (max_stack_depth), Qnil));
   return log;
@@ -247,7 +247,7 @@ handle_profiler_signal (int signal)
       if (profiler_timer_ok)
        {
          int overruns = timer_getoverrun (profiler_timer);
-         eassert (0 <= overruns);
+         eassert (overruns >= 0);
          count += overruns;
        }
 #endif
@@ -560,7 +560,7 @@ hashfn_profiler (struct hash_table_test *ht, Lisp_Object bt)
               ? XHASH (XCDR (XCDR (f))) : XHASH (f));
          hash = sxhash_combine (hash, hash1);
        }
-      return (hash & INTMASK);
+      return SXHASH_REDUCE (hash);
     }
   else
     return XHASH (bt);