* xselect.c (Fx_get_atom_name): Avoid need for strlen.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Jun 2011 02:16:54 +0000 (19:16 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 21 Jun 2011 02:16:54 +0000 (19:16 -0700)
src/ChangeLog
src/xselect.c

index b388b1e..0c7cac3 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-21  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * 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.
index 5b01fc2..7f4e0b4 100644 (file)
@@ -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;