consistently return -1 in SvFileStream::PutData

for the error case

Just for consistency with the other error cases in PutData/GetData

Change-Id: Ib7fd27f9347021b3063e6eac88fd8038d5f218e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176621
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-11-15 11:33:33 +02:00
parent 08e566f0c9
commit c6fa60bdff

View file

@ -243,7 +243,10 @@ std::size_t SvFileStream::PutData( const void* pData, std::size_t nSize )
return -1;
}
else if( !nWrite )
{
SetError( SVSTREAM_DISK_FULL );
return -1;
}
}
return static_cast<std::size_t>(nWrite);
}