From: Paul Eggert Date: Mon, 20 Jun 2011 06:07:16 +0000 (-0700) Subject: * keyboard.c (parse_tool_bar_item): Avoid need for strlen. X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52c61c22eeda7b11969f44d3c002ad94f228f29d;p=emacs.git * keyboard.c (parse_tool_bar_item): Avoid need for strlen. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4928e209364..b1035da6c7b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]: Don't assume string length fits in int. + * keyboard.c (parse_tool_bar_item): * gtkutil.c (style_changed_cb): Avoid need for strlen. * font.c: Don't assume string length fits in int. diff --git a/src/keyboard.c b/src/keyboard.c index e7a0598e839..bffe2b035dc 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8225,7 +8225,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) /* `:label LABEL-STRING'. */ PROP (TOOL_BAR_ITEM_LABEL) = STRINGP (value) ? value - : make_string (bad_label, strlen (bad_label)); + : build_string (bad_label); have_label = 1; } else if (EQ (ikey, QCfilter)) @@ -8291,7 +8291,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) else label = ""; - new_lbl = Fupcase_initials (make_string (label, strlen (label))); + new_lbl = Fupcase_initials (build_string (label)); if (SCHARS (new_lbl) <= tool_bar_max_label_size) PROP (TOOL_BAR_ITEM_LABEL) = new_lbl; else