]> xenbits.xensource.com Git - libvirt.git/commit
virnetdev: fix moving of 802.11 phys
authorLubomir Rintel <lkundrak@v3.sk>
Mon, 1 Jun 2015 18:40:23 +0000 (20:40 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Jun 2015 16:05:23 +0000 (18:05 +0200)
commit81b19ce46a9a65a00481403b8c0b15a8ac1367f2
treef23f43b749426a4ca3fc69f56335f565178d64b5
parent825df8c3158cfaf5f398418471f10f4ff3c3515a
virnetdev: fix moving of 802.11 phys

There was a couple of problems with the style fixes applied to the original
patch:

1.) virFileReadAllQuiet comparison was incorrectly parenthesized when moved
into a condition, causing the len to be set to the result of comparison. This,
together with the removed underflow check would underflow the phy buffer.

2.) The logic was broken. Failure to call "ip" would abort the function, thus
the "iw" branch would never be reached.

This aims to fix the issues and work around possible style complains :)

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
src/util/virnetdev.c