Bug 366763 - kio-extras-16.07.80/sftp/kio_sftp.cpp:1249]: (style) Suspicious condition
Summary: kio-extras-16.07.80/sftp/kio_sftp.cpp:1249]: (style) Suspicious condition
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Development Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-14 20:01 UTC by dcb314
Modified: 2016-08-15 01:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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