Commit 95a5ed31 authored by Harald Sitter's avatar Harald Sitter 🏳🌈
Browse files

smb: make sure we use balanced arguments on qmax

previously there was opportunity for failure here when the deduced literal
type was different from the actual off_t type and qmax is very picky
about explicit input types. so, instead cast to off_t, as any int will
accommodate 0 anyway so the cast has no downsides.

BUG: 419702
parent 47d1b272
......@@ -14,7 +14,7 @@ TransferSegment::TransferSegment(const off_t fileSize)
off_t TransferSegment::segmentSizeForFileSize(const off_t fileSize_)
{
const off_t fileSize = qMax(0L, fileSize_);
const off_t fileSize = qMax(static_cast<off_t>(0), fileSize_);
// read() internally splits our read requests into multiple server
// requests and then assembles the responses into our buffer.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment