diff options
| author | Paul Eggert | 2012-08-03 16:36:11 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-03 16:36:11 -0700 |
| commit | 98c6f1e36ff487925280fa0b0340af9d058632b5 (patch) | |
| tree | 5601a2ac9433883b753a36f8d9c15f9d9d0b0eec /src/keymap.c | |
| parent | 8834c57aab03fb7ea9d92f9e995844ff7ce64b7b (diff) | |
| download | emacs-98c6f1e36ff487925280fa0b0340af9d058632b5.tar.gz emacs-98c6f1e36ff487925280fa0b0340af9d058632b5.zip | |
Remove unnecessary casts involving pointers.
These casts are no longer needed now that we assume C89 or later,
since they involve casting to or from void *.
* alloc.c (make_pure_string, make_pure_c_string, pure_cons)
(make_pure_float, make_pure_vector):
* lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
* macros.c (Fstart_kbd_macro):
* menu.c (find_and_return_menu_selection):
* minibuf.c (read_minibuf_noninteractive):
* sysdep.c (closedir):
* xdisp.c (x_produce_glyphs):
* xfaces.c (compare_fonts_by_sort_order):
* xfns.c (x_real_positions, select_visual):
* xselect.c (x_stop_queuing_selection_requests)
(x_get_window_property, x_get_window_property_as_lisp_data):
* xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
Remove unnecessary pointer casts.
* alloc.c (record_xmalloc): New function.
* lisp.h (record_xmalloc): New decl.
(SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
more like a function. This is because the pointer cast is not
needed. All uses changed.
* print.c (print_string, print_error_message): Avoid length recalc.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/keymap.c b/src/keymap.c index ed8542249e5..ed65a5f3d8a 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2304,11 +2304,10 @@ around function keys and event symbols. */) | |||
| 2304 | { | 2304 | { |
| 2305 | if (NILP (no_angles)) | 2305 | if (NILP (no_angles)) |
| 2306 | { | 2306 | { |
| 2307 | char *buffer; | ||
| 2308 | Lisp_Object result; | 2307 | Lisp_Object result; |
| 2309 | USE_SAFE_ALLOCA; | 2308 | USE_SAFE_ALLOCA; |
| 2310 | SAFE_ALLOCA (buffer, char *, | 2309 | char *buffer = SAFE_ALLOCA (sizeof "<>" |
| 2311 | sizeof "<>" + SBYTES (SYMBOL_NAME (key))); | 2310 | + SBYTES (SYMBOL_NAME (key))); |
| 2312 | esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key))); | 2311 | esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key))); |
| 2313 | result = build_string (buffer); | 2312 | result = build_string (buffer); |
| 2314 | SAFE_FREE (); | 2313 | SAFE_FREE (); |