emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: member inconsistency?


From: Andreas Schwab
Subject: Re: member inconsistency?
Date: Thu, 28 Jan 2016 23:18:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Stephen Berman <address@hidden> writes:

> diff --git a/src/fns.c b/src/fns.c
> index 86ad333..17c4a75 100644
> --- a/src/fns.c
> +++ b/src/fns.c
> @@ -1349,7 +1349,7 @@ The value is actually the tail of LIST whose car is 
> ELT.  */)
>    (register Lisp_Object elt, Lisp_Object list)
>  {
>    register Lisp_Object tail;
> -  for (tail = list; CONSP (tail); tail = XCDR (tail))
> +  for (tail = list; CONSP (tail) || !NILP (tail); tail = XCDR (tail))
>      {
>        register Lisp_Object tem;
>        CHECK_LIST_CONS (tail, list);

The check for CONSP in the loop condition is redundant, that is already
checked by CHECK_LIST_CONS (and the latter was a no-op before).

Andreas.

-- 
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]