Bug 1493080

Summary: libdm/libdm-report.c:3415]: (style) Suspicious condition
Product: [Community] LVM and device-mapper Reporter: David Binderman <dcb314>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Other QA Contact: cluster-qe <cluster-qe>
Status: POST --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Version: 2.02.174Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2017-09-19 10:41:59 UTC
Description of problem:

LVM2.2.02.174/libdm/libdm-report.c:3415]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

        if ((r = handler(rh, rh->selection->mem, field_num,
                 DM_REPORT_RESERVED_GET_DYNAMIC_VALUE,
                 rvw->matched_name, &tmp_value) <= 0)) {

Maybe better code

        if ((r = handler(rh, rh->selection->mem, field_num,
                 DM_REPORT_RESERVED_GET_DYNAMIC_VALUE,
                 rvw->matched_name, &tmp_value)) <= 0) {


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Zdenek Kabelac 2017-09-19 11:12:20 UTC
Thanks for noticing - fix will be pushed upstream soon.

Comment 2 Zdenek Kabelac 2017-09-20 13:22:41 UTC
Fixed with upstream commit:

https://www.redhat.com/archives/lvm-devel/2017-September/msg00026.html