From: Dmitry Antipov Date: Tue, 30 Jul 2013 04:35:44 +0000 (+0400) Subject: * frame.c (Fmodify_frame_parameters): Always check 2nd arg with X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1696 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec3058af9654df71cce93629f3eab32dcbb6b946;p=emacs.git * frame.c (Fmodify_frame_parameters): Always check 2nd arg with CHECK_LIST. Rewrite the loop to avoid useless local variable. --- diff --git a/src/ChangeLog b/src/ChangeLog index b7b2d5fba4b..73525169bf9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-07-30 Dmitry Antipov + + * frame.c (Fmodify_frame_parameters): Always check 2nd arg with + CHECK_LIST. Rewrite the loop to avoid useless local variable. + 2013-07-29 Dmitry Antipov * fns.c (toplevel): Remove comment before Fsafe_length because diff --git a/src/frame.c b/src/frame.c index 95f53569561..f8b7201e984 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2253,7 +2253,9 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) (Lisp_Object frame, Lisp_Object alist) { struct frame *f = decode_live_frame (frame); - register Lisp_Object tail, prop, val; + register Lisp_Object prop, val; + + CHECK_LIST (alist); /* I think this should be done with a hook. */ #ifdef HAVE_WINDOW_SYSTEM @@ -2278,12 +2280,11 @@ use is not recommended. Explicitly check for a frame-parameter instead. */) /* Extract parm names and values into those vectors. */ - i = 0; - for (tail = alist; CONSP (tail); tail = XCDR (tail)) + for (i = 0; CONSP (alist); alist = XCDR (alist)) { Lisp_Object elt; - elt = XCAR (tail); + elt = XCAR (alist); parms[i] = Fcar (elt); values[i] = Fcdr (elt); i++;