Bug 1493080 - libdm/libdm-report.c:3415]: (style) Suspicious condition
Summary: libdm/libdm-report.c:3415]: (style) Suspicious condition
Keywords:
Status: POST
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.174
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-19 10:41 UTC by David Binderman
Modified: 2023-08-10 15:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

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


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