Skip to content

Commit

Permalink
XrdTpc: Fix error condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Jan 24, 2021
1 parent e4a77f2 commit 22d1d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrdTpc/XrdTpcStream.hh
Expand Up @@ -80,7 +80,7 @@ private:
if (!size_desired) {return 0;}
}
int retval = stream.Write(m_offset, &m_buffer[0], size_desired, force);
if (retval < 0 && (static_cast<size_t>(retval) != size_desired)) {
if ((retval == -1) || (static_cast<size_t>(retval) != size_desired)) {
return -1;
}
// If partial data remains, copy it to the beginning of the buffer.
Expand Down

0 comments on commit 22d1d31

Please sign in to comment.