comparison src/fns.c @ 12618:60c4c0fee545

(Fsafe_length): Use conservative upper bound.
author Karl Heuer <kwzh@gnu.org>
date Thu, 20 Jul 1995 20:26:06 +0000
parents b22565172b9b
children 99c5d39b9531
comparison
equal deleted inserted replaced
12617:2a4a6e89558d 12618:60c4c0fee545
145 /* halftail is used to detect circular lists. */ 145 /* halftail is used to detect circular lists. */
146 halftail = list; 146 halftail = list;
147 for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) 147 for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr)
148 { 148 {
149 if (EQ (tail, halftail) && len != 0) 149 if (EQ (tail, halftail) && len != 0)
150 { 150 break;
151 len /= 2;
152 break;
153 }
154 len++; 151 len++;
155 if (len & 1 == 0) 152 if (len & 1 == 0)
156 halftail = XCONS (halftail)->cdr; 153 halftail = XCONS (halftail)->cdr;
157 } 154 }
158 155