From 322307272cb7fa72343b6563942c0fa251c2cd1a Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sat, 28 Feb 2009 13:36:14 +0100 Subject: [PATCH] Slight optimization of nreconc, removing a redundant check for Null. --- src/c/list.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/c/list.d b/src/c/list.d index 6eaaa2d5c..406025a83 100644 --- a/src/c/list.d +++ b/src/c/list.d @@ -580,15 +580,14 @@ cl_nreconc(cl_object l, cl_object y) /* INV: when a circular list is "reconc'ed", the pointer ends up at the beginning of the original list, hence we need no slow pointer */ - for (x = l; CONSP(x); ) { + for (x = l; !Null(x); ) { + if (!LISTP(x)) FEtype_error_list(x); z = x; x = ECL_CONS_CDR(x); if (x == l) FEcircular_list(l); ECL_RPLACD(z, y); y = z; } - if (x != Cnil) - FEtype_error_list(x); @(return y) }