]> xenbits.xensource.com Git - libvirt.git/commit
build: address clang reports about virCommand
authorEric Blake <eblake@redhat.com>
Mon, 14 Feb 2011 22:24:08 +0000 (15:24 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 15 Feb 2011 17:43:40 +0000 (10:43 -0700)
commit3db08aeaef8125a4285eb96b848739a383d2d18e
treeb3843c0b69bdbf31e1e9f6b76594fe9f087747ed
parent1a82c5f7c6e93bdca50ad0aa2317c7e9f38258c2
build: address clang reports about virCommand

clang had 5 reports against virCommand; three were false positives
(a NULL deref in ProcessIO solved by sa_assert, and two uninitialized
memory operations solved by adding an initializer), but two were real.

* src/util/command.c (virCommandProcessIO): Fix real bug of
possible NULL dereference.  Teach clang that buf is never NULL.
(virCommandRun): Teach clang that infd is only ever accessed when
initialized.
src/util/command.c