]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
storage: kill dead stores
authorEric Blake <eblake@redhat.com>
Fri, 30 Jul 2010 16:24:17 +0000 (10:24 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 30 Jul 2010 20:13:47 +0000 (14:13 -0600)
commit549b839960a832ee6887a6d773e4346c53a07569
tree5b27b44abf5d658dbc722d4bb7660581c7d6d1f3
parent68e4be71bee8ddc0f45985c66552c35674232a82
storage: kill dead stores

Found by clang.  Clang complained that virStorageBackendProbeTarget
could dereference NULL if backingStoreFormat was NULL, but since all
callers passed a valid pointer, I added attributes instead of null
checks.

* src/storage/storage_backend.c
(virStorageBackendQEMUImgBackingFormat): Kill dead store.
* src/storage/storage_backend_fs.c (virStorageBackendProbeTarget):
Likewise.  Skip null checks, by adding attributes.
src/storage/storage_backend.c
src/storage/storage_backend_fs.c