]> git.proxmox.com Git - mirror_qemu.git/commit
pci-assign: avoid pointless stat
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Jan 2017 15:05:25 +0000 (16:05 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 24 Jan 2017 20:26:53 +0000 (23:26 +0300)
commit9ed2690354e65a87b830f197cac0138e842f989e
treec068465296cef233a26e14a4c8dfe19a478dd967
parentece9086eb5e3f05e6a3ebb2ec3242932c3b37963
pci-assign: avoid pointless stat

Just check the errno value after fopen and follow it with fstat.
This shuts up Coverity's complaint about TOC/TOU violation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/i386/pci-assign-load-rom.c