]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix over-zealous assertions
authorMattias Engdegård <mattiase@acm.org>
Thu, 17 Mar 2022 14:08:24 +0000 (15:08 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 17 Mar 2022 14:08:24 +0000 (15:08 +0100)
* src/sort.c (gallop_left, gallop_right): Don't test Lisp values for
being nonzero; it only made sense when `key` was a pointer that had to
be non-null.

src/sort.c

index 24469ef99dceb45bc3b31248c16b350a8007c5c8..3f7a2909ad7979d7d0006359e930918074fddf4f 100644 (file)
@@ -223,7 +223,7 @@ gallop_left (merge_state *ms, const Lisp_Object key, Lisp_Object *a,
 {
   Lisp_Object pred = ms->predicate;
 
-  eassume (key && a && n > 0 && hint >= 0 && hint < n);
+  eassume (a && n > 0 && hint >= 0 && hint < n);
 
   a += hint;
   ptrdiff_t lastofs = 0;
@@ -306,7 +306,7 @@ gallop_right (merge_state *ms, const Lisp_Object key, Lisp_Object *a,
 {
   Lisp_Object pred = ms->predicate;
 
-  eassume (key && a && n > 0 && hint >= 0 && hint < n);
+  eassume (a && n > 0 && hint >= 0 && hint < n);
 
   a += hint;
   ptrdiff_t lastofs = 0;