From f3e92b69d2fa865d82793ac41370045a85beb269 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 19 Jun 2011 11:44:58 -0700 Subject: [PATCH] * data.c (Fsubr_name): Rewrite to avoid a strlen call. --- src/ChangeLog | 2 ++ src/data.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99d9cad7628..e5d7a81792e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-06-19 Paul Eggert + * data.c (Fsubr_name): Rewrite to avoid a strlen call. + * coding.c (make_subsidiaries): Don't assume string length fits in int. * callproc.c (child_setup): Rewrite to avoid two strlen calls. diff --git a/src/data.c b/src/data.c index cf01d38036d..6b4ea32ac9e 100644 --- a/src/data.c +++ b/src/data.c @@ -703,7 +703,7 @@ SUBR must be a built-in function. */) const char *name; CHECK_SUBR (subr); name = XSUBR (subr)->symbol_name; - return make_string (name, strlen (name)); + return build_string (name); } DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, -- 2.39.2