[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/timsort 43a339fe10: Fix over-zealous assertions
From: |
Mattias Engdegård |
Subject: |
scratch/timsort 43a339fe10: Fix over-zealous assertions |
Date: |
Thu, 17 Mar 2022 10:10:29 -0400 (EDT) |
branch: scratch/timsort
commit 43a339fe10df3952a5f1749403d7b8148554008a
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Fix over-zealous assertions
* 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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sort.c b/src/sort.c
index 24469ef99d..3f7a2909ad 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/timsort 43a339fe10: Fix over-zealous assertions,
Mattias Engdegård <=