]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virpcivpd: Bring variables into loops
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Nov 2021 16:23:41 +0000 (17:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Nov 2021 13:46:54 +0000 (14:46 +0100)
commitad8ba5b199882a3295ec4d3cf8b898bfa401054f
tree9d8daf3ee819c4f84784d63e35d9b1d78fa584bf
parentbed0329b1cd3e947750ef19c06515b0713eba60b
virpcivpd: Bring variables into loops

I've noticed one function inside virpcivpd.c, namely
virPCIVPDParseVPDLargeResourceFields() that declares some
variables at the top level even though they are used only inside
a loop in which they have to be freed explicitly.

Bringing variable declarations into the loop allows us to make
the code nicer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
src/util/virpcivpd.c