diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-06-30 11:03:28 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-07-02 06:25:28 +0200 |
commit | 9261ef5e32b0559642ccb70565836e1bc023937e (patch) | |
tree | c05577c4c52758094879bad94e4b2af7b0a4302a /hw/arm/virt.c | |
parent | 5a79d10c953c9eebc69e4ad7c18cd8476782cf6f (diff) |
Clean up some calls to ignore Error objects the right way
Receiving the error in a local variable only to free it is less clear
(and also less efficient) than passing NULL. Clean up.
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Jerome Forissier <jerome@forissier.org>
CC: Greg Kurz <groug@kaod.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20200630090351.1247703-4-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r-- | hw/arm/virt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index cd0834ce7f..af3050bc4b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -217,11 +217,9 @@ static bool cpu_type_valid(const char *cpu) static void create_kaslr_seed(VirtMachineState *vms, const char *node) { - Error *err = NULL; uint64_t seed; - if (qemu_guest_getrandom(&seed, sizeof(seed), &err)) { - error_free(err); + if (qemu_guest_getrandom(&seed, sizeof(seed), NULL)) { return; } qemu_fdt_setprop_u64(vms->fdt, node, "kaslr-seed", seed); |