qemu-e2k/ui
Markus Armbruster b21e238037 Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).

Patch created mechanically with:

    $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \
	     --macro-file scripts/cocci-macro-file.h FILES...

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220315144156.1595462-4-armbru@redhat.com>
Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
2022-03-21 15:44:44 +01:00
..
icons
keycodemapdb@d21009b1c9
shader
clipboard.c
cocoa.m
console-gl.c
console.c
curses_keys.h
curses.c
cursor_hidden.xpm
cursor_left_ptr.xpm
cursor.c
dbus-chardev.c
dbus-clipboard.c
dbus-console.c
dbus-display1.xml
dbus-error.c
dbus-listener.c
dbus-module.c
dbus.c
dbus.h
egl-context.c
egl-headless.c
egl-helpers.c
gtk-clipboard.c
gtk-egl.c
gtk-gl-area.c
gtk.c
input-barrier.c
input-barrier.h
input-keymap.c
input-legacy.c
input-linux.c
input.c
kbd-state.c
keymaps.c
keymaps.h
meson.build
qemu-pixman.c
qemu-x509.h
qemu.desktop
sdl2-2d.c
sdl2-gl.c
sdl2-input.c
sdl2.c
shader.c
spice-app.c
spice-core.c
spice-display.c
spice-input.c
spice-module.c
trace-events
trace.h
udmabuf.c
util.c
vdagent.c
vgafont.h
vnc_keysym.h
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-clipboard.c
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c
vnc-ws.c
vnc-ws.h
vnc.c ui: avoid unnecessary memory operations in vnc_refresh_server_surface() 2022-03-18 09:30:01 +01:00
vnc.h
win32-kbd-hook.c
x_keymap.c
x_keymap.h