Bug 1717090 - libvirt-5.4.0/tests/testutilsqemu.c:921]: (style) Suspicious condition
Summary: libvirt-5.4.0/tests/testutilsqemu.c:921]: (style) Suspicious condition
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Erik Skultety
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-04 16:51 UTC by David Binderman
Modified: 2019-06-04 19:02 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-04 19:02:35 UTC
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2019-06-04 16:51:44 UTC
Description of problem:

libvirt-5.4.0/tests/testutilsqemu.c:921]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.
85a250

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Source code is

  while ((rc = virDirRead(dir, &ent, TEST_QEMU_CAPS_PATH) > 0)) {

Maybe better code:

  while ((rc = virDirRead(dir, &ent, TEST_QEMU_CAPS_PATH)) > 0) {

Comment 1 Erik Skultety 2019-06-04 19:02:35 UTC
Fixed upstream by:
commit 08ad83eee133d6bac27865d9321e399db7bbe29e
Refs: v5.4.0-49-g08ad83eee1
Author:     Erik Skultety <eskultet>
AuthorDate: Tue Jun 4 20:56:58 2019 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Tue Jun 4 20:56:58 2019 +0200

    tests: Fix parentheses order in an assignment-comparison conditional

    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1717090

    Signed-off-by: Erik Skultety <eskultet>


Note You need to log in before you can comment on or make changes to this bug.