1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00
emacs/admin/coccinelle/alloc_cast.cocci
Stefan Kangas 1a2fa8f413 Remove redundant casts from void* with malloc functions
* src/msdos.c (IT_menu_make_room):
* src/pgtkterm.c (pgtk_define_fringe_bitmap):
* src/w16select.c (set_clipboard_data):
* src/w32term.c (w32_define_fringe_bitmap):
* src/w32uniscribe.c (uniscribe_shape): Remove redundant cast from
void* with xrealloc.
* admin/coccinelle/alloc_cast.cocci: New semantic patch.
2024-01-10 14:48:00 +01:00

7 lines
138 B
Plaintext

// Remove redundant casts from memory allocation functions.
@@
type T;
@@
-(T *)
\(xmalloc\|xzalloc\|xrealloc\|xpalloc\|xnrealloc\)(...)