summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liblali.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liblali.c b/liblali.c
index cfd4d76..831cc66 100644
--- a/liblali.c
+++ b/liblali.c
@@ -855,13 +855,13 @@ Object *primitiveDiff(Object **args, GC_PARAM) {
(first->type == TYPE_SYMBOL && second->type == TYPE_SYMBOL))
return strcmp(first->string, second->string) ? t : f;
else if (first->type == TYPE_CONS && second->type == TYPE_CONS) {
- for (; (first->cdr != nil || second->cdr != nil);
+ for (; (first->cdr->type == TYPE_CONS && second->cdr->type == TYPE_CONS);
first = first->cdr, second = second->cdr) {
if (strcmp(first->string, second->string))
return t;
}
return (strcmp(first->car->string, second->car->string) ||
- (first->cdr != nil && second->cdr != nil)) ? t : f;
+ strcmp(first->cdr->string, second->cdr->string)) ? t : f;
}
else
return t;