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

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2016-06-16 14:31:31 UTC
kio-extras-16.04.2/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)) {

Maybe better code

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


Reproducible: Always
Comment 1 Christoph Feck 2016-08-15 01:55:57 UTC
Already reported as bug 366763.