From: Paul Eggert Date: Tue, 21 Jun 2011 02:16:54 +0000 (-0700) Subject: * xselect.c (Fx_get_atom_name): Avoid need for strlen. X-Git-Tag: emacs-pretest-24.0.90~104^2~473^2~10 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3a5077c52bb88d1a354d4122ef4bf660d84651f6;p=emacs.git * xselect.c (Fx_get_atom_name): Avoid need for strlen. --- diff --git a/src/ChangeLog b/src/ChangeLog index b388b1e3ea7..0c7cac342d9 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 5b01fc22a42..7f4e0b40f62 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;