Bug 1493082 - tools/toollib.c:4467]: (style) Suspicious condition
Summary: tools/toollib.c:4467]: (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:45 UTC by David Binderman
Modified: 2023-08-10 15:40 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:45:48 UTC
Description of problem:

LVM2.2.02.174/tools/toollib.c:4467]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.


Source code is

   if ((ret = _get_all_devices(cmd, &all_devices) != ECMD_PROCESSED)) {

Maybe better code

   if ((ret = _get_all_devices(cmd, &all_devices)) != ECMD_PROCESSED) {


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:11:56 UTC
Thanks for noticing - fix will be pushed upstream soon.

Comment 2 Zdenek Kabelac 2017-09-20 13:23:26 UTC
Fixed with upstream commit: 
https://www.redhat.com/archives/lvm-devel/2017-September/msg00023.html


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