diff options
| author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-03-02 06:51:40 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@kaod.org> | 2022-03-02 06:51:40 +0100 |
| commit | 1628293727f1872d1add9dc53897b2b262ed5fe9 (patch) | |
| tree | c99e22c02e145064cd6f259ab81c18c470649a39 /hw/core/generic-loader.c | |
| parent | 5436eee1aceff14e301fce6d2385cc253a3b6473 (diff) | |
| download | focaccia-qemu-1628293727f1872d1add9dc53897b2b262ed5fe9.tar.gz focaccia-qemu-1628293727f1872d1add9dc53897b2b262ed5fe9.zip | |
hw/ppc/spapr_numa.c: simplify spapr_numa_write_assoc_lookup_arrays()
We can get the job done in spapr_numa_write_assoc_lookup_arrays() a bit cleaner: - 'cur_index = int_buf = g_malloc0(..)' is doing a g_malloc0() in the 'int_buf' pointer and making 'cur_index' point to 'int_buf' all in a single line. No problem with that, but splitting into 2 lines is clearer to follow - use g_autofree in 'int_buf' to avoid a g_free() call later on - 'buf_len' is only being used to store the size of 'int_buf' malloc. Remove the var and just use the value in g_malloc0() directly - remove the 'ret' var and just return the result of fdt_setprop() Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220228175004.8862-12-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/core/generic-loader.c')
0 files changed, 0 insertions, 0 deletions