Use correct variable type for returned value from read/sendfile
ClosedPublic

Authored by davidedmundson on Nov 20 2018, 2:06 PM.

Details

Summary

n stores the read/transferred bytes. This returns a ssize_t.
We were casting to an int, which theoretically is a loss of data.

In practice it isn't an issue as we only read a max of MAX_IPC_SIZE at a
time, which would fit in an int.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Nov 20 2018, 2:06 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptNov 20 2018, 2:06 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Nov 20 2018, 2:06 PM
apol accepted this revision.Nov 20 2018, 2:13 PM
This revision is now accepted and ready to land.Nov 20 2018, 2:13 PM
This revision was automatically updated to reflect the committed changes.