aboutsummaryrefslogtreecommitdiffstats
path: root/src/msdos.c
diff options
context:
space:
mode:
authorStefan Kangas2024-01-10 08:18:22 +0100
committerStefan Kangas2024-01-10 14:48:00 +0100
commit1a2fa8f413ffacc2490f4c46b3bbfc37b16fbd04 (patch)
treef0868b829ce2be1e5fe609a4e86f045097bd3766 /src/msdos.c
parent83ee584052f063cc802fca427c42ece2d5091ca5 (diff)
downloademacs-1a2fa8f413ffacc2490f4c46b3bbfc37b16fbd04.tar.gz
emacs-1a2fa8f413ffacc2490f4c46b3bbfc37b16fbd04.zip
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.
Diffstat (limited to 'src/msdos.c')
-rw-r--r--src/msdos.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/msdos.c b/src/msdos.c
index bdacda50975..1f82d4029d7 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -2811,14 +2811,10 @@ IT_menu_make_room (XMenu *menu)
2811 else if (menu->allocated == menu->count) 2811 else if (menu->allocated == menu->count)
2812 { 2812 {
2813 int count = menu->allocated = menu->allocated + 10; 2813 int count = menu->allocated = menu->allocated + 10;
2814 menu->text 2814 menu->text = xrealloc (menu->text, count * sizeof (char *));
2815 = (char **) xrealloc (menu->text, count * sizeof (char *)); 2815 menu->submenu = xrealloc (menu->submenu, count * sizeof (XMenu *));
2816 menu->submenu 2816 menu->panenumber = xrealloc (menu->panenumber, count * sizeof (int));
2817 = (XMenu **) xrealloc (menu->submenu, count * sizeof (XMenu *)); 2817 menu->help_text = xrealloc (menu->help_text, count * sizeof (char *));
2818 menu->panenumber
2819 = (int *) xrealloc (menu->panenumber, count * sizeof (int));
2820 menu->help_text
2821 = (const char **) xrealloc (menu->help_text, count * sizeof (char *));
2822 } 2818 }
2823} 2819}
2824 2820