Bug 364381

Summary: 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 NOT A BUG    
Severity: normal    
Priority: NOR    
Version: 5.6.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.