Bug 1493082

Summary: tools/toollib.c:4467]: (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: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