]> git.ipfire.org Git - thirdparty/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)
committerCole Robinson <crobinso@redhat.com>
Fri, 5 Jun 2015 23:34:40 +0000 (19:34 -0400)
commitd7395473d1728366b6115066cecf62474680722b
tree1dad44d9ee225842da7a83d8875accb38d97d354
parentcc2add968148090477efbac191bb811facc16272
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>
(cherry picked from commit 81b19ce46a9a65a00481403b8c0b15a8ac1367f2)
src/util/virnetdev.c