Skip to content

Commit

Permalink
minor change and clarification to the File.write return value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Carroll authored and davilla committed Mar 11, 2013
1 parent 98fd411 commit d5b2bfe
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions xbmc/interfaces/legacy/File.cpp
Expand Up @@ -56,11 +56,9 @@ namespace XBMCAddon
bool File::write(XbmcCommons::Buffer& buffer)
{
DelayedCallGuard dg(languageHook);
unsigned long totalBytesWritten = 0;
while (buffer.remaining() > 0)
{
int bytesWritten = file->Write( buffer.curPosition(), buffer.remaining());
totalBytesWritten += bytesWritten;
if (bytesWritten == 0) // this could be a failure (see HDFile, and XFileUtils) or
// it could mean something else when a negative number means an error
// (see CCurlFile). There is no consistency so we can only assume we're
Expand Down

0 comments on commit d5b2bfe

Please sign in to comment.