Bug 366763

Summary: kio-extras-16.07.80/sftp/kio_sftp.cpp:1249]: (style) Suspicious condition
Product: [Frameworks and Libraries] kio-extras Reporter: dcb314
Component: defaultAssignee: Plasma Development Mailing List <plasma-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description dcb314 2016-08-14 20:01:03 UTC
kio-extras-16.07.80/sftp/kio_sftp.cpp:1249]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

    } else if ((errorCode = writeToFile(fd, filedata.constData(), filedata.size()) != 0)) {

Suggest new code
    } else if ((errorCode = writeToFile(fd, filedata.constData(), filedata.size())) != 0) {



Reproducible: Always
Comment 1 Christoph Feck 2016-08-15 01:54:37 UTC
Git commit c7049eb74086986d7b59dedefc7036ce9cc7440b by Christoph Feck, on behalf of David Binderman.
Committed on 15/08/2016 at 01:50.
Pushed by cfeck into branch 'master'.

Fix suspicious condition (assignment + comparison)
Reviewed by Christoph Feck

M  +1    -1    sftp/kio_sftp.cpp

http://commits.kde.org/kio-extras/c7049eb74086986d7b59dedefc7036ce9cc7440b