From 52c61c22eeda7b11969f44d3c002ad94f228f29d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 19 Jun 2011 23:07:16 -0700 Subject: [PATCH] * keyboard.c (parse_tool_bar_item): Avoid need for strlen. --- src/ChangeLog | 1 + src/keyboard.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2