From 3a5077c52bb88d1a354d4122ef4bf660d84651f6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 20 Jun 2011 19:16:54 -0700 Subject: [PATCH] * xselect.c (Fx_get_atom_name): Avoid need for strlen. --- src/ChangeLog | 2 ++ src/xselect.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b388b1e3ea..0c7cac342d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-06-21 Paul Eggert + * xselect.c (Fx_get_atom_name): Avoid need for strlen. + * xrdb.c: Don't assume strlen fits in int; avoid some strlens. * xrdb.c (magic_file_p, search_magic_path): Omit last arg SUFFIX; it was always 0. All callers changed. diff --git a/src/xselect.c b/src/xselect.c index 5b01fc22a4..7f4e0b40f6 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2361,7 +2361,7 @@ If the value is 0 or the atom is not known, return the empty string. */) x_uncatch_errors (); if (!had_errors) - ret = make_string (name, strlen (name)); + ret = build_string (name); if (atom && name) XFree (name); if (NILP (ret)) ret = empty_unibyte_string; -- 2.20.1