xemu/include
Paolo Bonzini 5e9efe31f1 bitmap: Use g_try_new0/g_new0/g_renew
Avoids an explicit use of sizeof().  The GLib allocation macros
ensure that the multiplication by the size of the element
uses the right type and does not overflow.

While at it, change bitmap_new() to use g_new0 directly.  Its current
impl of calling bitmap_try_new() followed by a plain abort() has
worse diagnostics than g_new0, which uses g_error to report the actual
allocation size that failed.

Cc: qemu-trivial@nongnu.org
Cc: Roman Kiryanov <rkir@google.com>
Reviewed-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-05-03 15:47:48 +02:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block virtio: Re-enable notifications after drain 2024-02-07 21:51:03 +01:00
chardev chardev: use bool for fe_is_open 2024-01-12 13:23:48 +00:00
crypto crypto: Modify the qcrypto_block_create to support creation flags 2024-02-09 12:50:37 +00:00
disas target/nios2: Remove the deprecated Nios II target 2024-04-24 16:03:38 +02:00
exec plugins: Remove plugin helpers 2024-04-30 16:12:05 -07:00
fpu fpu: Add conversions between bfloat16 and [u]int8 2023-09-16 14:57:15 +00:00
gdbstub gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h' 2024-04-26 15:31:37 +02:00
hw target-arm queue: 2024-04-30 09:58:54 -07:00
io io: Introduce qio_channel_file_new_dupfd 2024-03-12 15:22:23 -04:00
libdecnumber Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
migration migration: Add Error** argument to .load_setup() handler 2024-04-23 18:36:01 -04:00
monitor hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper 2024-04-24 16:03:38 +02:00
net Revert "tap: setting error appropriately when calling net_init_tap_one()" 2024-03-29 14:59:07 +08:00
qapi qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition 2024-04-24 09:50:58 +02:00
qemu bitmap: Use g_try_new0/g_new0/g_renew 2024-05-03 15:47:48 +02:00
qom include/qom/object.h: New OBJECT_DEFINE_SIMPLE_TYPE{, _WITH_INTERFACES} macros 2024-02-27 13:01:42 +00:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting semihosting/uaccess: Avoid including 'cpu.h' 2024-04-26 15:31:37 +02:00
standard-headers Removal of deprecated code 2024-04-24 11:49:57 -07:00
sysemu accel/hvf: Use accel-specific per-vcpu @dirty field 2024-04-26 17:03:00 +02:00
tcg plugins: Replace pr_ops with a proper debug dump flag 2024-04-30 16:12:05 -07:00
ui ui/curses: Do not use console_select() 2024-03-20 10:27:58 +04:00
user exec: Restrict inclusion of 'user/guest-base.h' 2024-04-26 17:03:05 +02:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-main.h ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00