From: Paul Eggert Date: Sun, 3 Apr 2011 05:46:57 +0000 (-0700) Subject: * fns.c (substring_both): Remove var that is set but not used. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~394^2~42 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0bc0b309f6023bbfe14683095bea3bbf536b4602;p=emacs.git * fns.c (substring_both): Remove var that is set but not used. --- diff --git a/src/ChangeLog b/src/ChangeLog index fe7779304ad..04a27863fd0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-04-03 Paul Eggert + * fns.c (substring_both): Remove var that is set but not used. + * eval.c (funcall_lambda): Rename local to avoid shadowing. * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int. diff --git a/src/fns.c b/src/fns.c index bce922859d1..8346dbc690a 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1247,17 +1247,10 @@ substring_both (Lisp_Object string, EMACS_INT from, EMACS_INT from_byte, { Lisp_Object res; EMACS_INT size; - EMACS_INT size_byte; CHECK_VECTOR_OR_STRING (string); - if (STRINGP (string)) - { - size = SCHARS (string); - size_byte = SBYTES (string); - } - else - size = ASIZE (string); + size = STRINGP (string) ? SCHARS (string) : ASIZE (string); if (!(0 <= from && from <= to && to <= size)) args_out_of_range_3 (string, make_number (from), make_number (to));