diff options
| author | Paul Eggert | 2011-06-20 19:16:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-20 19:16:54 -0700 |
| commit | 3a5077c52bb88d1a354d4122ef4bf660d84651f6 (patch) | |
| tree | 7c4c35b5a2c3b0a3215f08adb07999f282eac8d6 /src | |
| parent | 281549626c7a22c2d8643fc563974ee6fbc401a8 (diff) | |
| download | emacs-3a5077c52bb88d1a354d4122ef4bf660d84651f6.tar.gz emacs-3a5077c52bb88d1a354d4122ef4bf660d84651f6.zip | |
* xselect.c (Fx_get_atom_name): Avoid need for strlen.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/xselect.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b388b1e3ea7..0c7cac342d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-06-21 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-06-21 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * xselect.c (Fx_get_atom_name): Avoid need for strlen. | ||
| 4 | |||
| 3 | * xrdb.c: Don't assume strlen fits in int; avoid some strlens. | 5 | * xrdb.c: Don't assume strlen fits in int; avoid some strlens. |
| 4 | * xrdb.c (magic_file_p, search_magic_path): | 6 | * xrdb.c (magic_file_p, search_magic_path): |
| 5 | Omit last arg SUFFIX; it was always 0. All callers changed. | 7 | 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. */) | |||
| 2361 | x_uncatch_errors (); | 2361 | x_uncatch_errors (); |
| 2362 | 2362 | ||
| 2363 | if (!had_errors) | 2363 | if (!had_errors) |
| 2364 | ret = make_string (name, strlen (name)); | 2364 | ret = build_string (name); |
| 2365 | 2365 | ||
| 2366 | if (atom && name) XFree (name); | 2366 | if (atom && name) XFree (name); |
| 2367 | if (NILP (ret)) ret = empty_unibyte_string; | 2367 | if (NILP (ret)) ret = empty_unibyte_string; |