From 0a553c12c71d5627abf223a926ab9688a5573f54 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 23 Sep 2022 14:00:24 +0200 Subject: Drop useless casts from g_malloc() & friends to pointer These memory allocation functions return void *, and casting to another pointer type is useless clutter. Drop these casts. If you really want another pointer type, consider g_new(). Signed-off-by: Markus Armbruster Reviewed-by: Laurent Vivier Message-Id: <20220923120025.448759-3-armbru@redhat.com> Signed-off-by: Laurent Vivier --- ui/vnc-enc-hextile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/vnc-enc-hextile.c') diff --git a/ui/vnc-enc-hextile.c b/ui/vnc-enc-hextile.c index 4215bd7daf..c763256f29 100644 --- a/ui/vnc-enc-hextile.c +++ b/ui/vnc-enc-hextile.c @@ -50,8 +50,8 @@ int vnc_hextile_send_framebuffer_update(VncState *vs, int x, int has_fg, has_bg; uint8_t *last_fg, *last_bg; - last_fg = (uint8_t *) g_malloc(VNC_SERVER_FB_BYTES); - last_bg = (uint8_t *) g_malloc(VNC_SERVER_FB_BYTES); + last_fg = g_malloc(VNC_SERVER_FB_BYTES); + last_bg = g_malloc(VNC_SERVER_FB_BYTES); has_fg = has_bg = 0; for (j = y; j < (y + h); j += 16) { for (i = x; i < (x + w); i += 16) { -- cgit v1.2.3