qemu-e2k/hw/net/rocker
Markus Armbruster 778358d0a8 rocker: 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).  Same Coccinelle semantic patchas in commit b45c03f.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-10-08 19:46:47 +03:00
..
qmp-norocker.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
rocker.c rocker: Use g_new() & friends where that makes obvious sense 2015-10-08 19:46:47 +03:00
rocker.h rocker: mark copy-to-cpu pkts as forwarding offloaded 2015-07-07 13:13:22 +01:00
rocker_desc.c rocker: Use g_new() & friends where that makes obvious sense 2015-10-08 19:46:47 +03:00
rocker_desc.h rocker: add new rocker switch device 2015-05-11 14:49:04 +01:00
rocker_fp.c rocker: Use g_new() & friends where that makes obvious sense 2015-10-08 19:46:47 +03:00
rocker_fp.h qmp/hmp: add rocker device support 2015-06-12 13:42:17 +01:00
rocker_hw.h rocker: mark copy-to-cpu pkts as forwarding offloaded 2015-07-07 13:13:22 +01:00
rocker_of_dpa.c rocker: Use g_new() & friends where that makes obvious sense 2015-10-08 19:46:47 +03:00
rocker_of_dpa.h rocker: add new rocker switch device 2015-05-11 14:49:04 +01:00
rocker_tlv.h rocker: add new rocker switch device 2015-05-11 14:49:04 +01:00
rocker_world.c rocker: return -1 when dropping packet on ingress 2015-07-07 13:13:22 +01:00
rocker_world.h rocker: add new rocker switch device 2015-05-11 14:49:04 +01:00