Description of problem: libvirt-3.7.0/daemon/admin.c:449]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses. Source code is if ((noutputs = adminConnectGetLoggingOutputs(&outputs, args->flags) < 0)) { Maybe better code if ((noutputs = adminConnectGetLoggingOutputs(&outputs, args->flags)) < 0) { Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed upstream by: commit 4c248e938a5541768614b94ad2f8b946a301434c Refs: v3.7.0-7-g4c248e938 Author: Erik Skultety <eskultet> AuthorDate: Tue Sep 5 10:06:33 2017 +0200 Commit: Erik Skultety <eskultet> CommitDate: Tue Sep 5 11:27:12 2017 +0200 maint: Fix incorrect parenthesis placement causing true/false assignment There were a few places in our code where the following pattern in 'if' condition occurred: if ((foo = bar() < 0)) do something; This patch adjusts the conditions to the expected format: if ((foo = bar()) < 0) do something; Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1488192 Signed-off-by: Erik Skultety <eskultet> Reviewed-by: Martin Kletzander <mkletzan>