mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
857df2fe50
In a few places we declare a variable (which is optionally followed by a code not touching it) then set the variable to a value and return the variable immediately. It's obvious that the variable is needless and the value can be returned directly instead. This patch was generated using this semantic patch: @@ type T; identifier ret; expression E; @@ - T ret; ... when != ret when strict - ret = E; - return ret; + return E; After that I fixed couple of formatting issues because coccinelle formatted some lines differently than our coding style. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>