Skip to content

Commit

Permalink
Fix comparisson.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Mar 5, 2014
1 parent 9de9fde commit fcdcfb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stored/backends/rados_device.c
Expand Up @@ -112,7 +112,7 @@ ssize_t rados_device::d_read(int fd, void *buffer, size_t count)
int nr_read;

nr_read = rados_read(m_ctx, getVolCatName(), (char *)buffer, count, m_offset);
if (nr_read > 0) {
if (nr_read >= 0) {
m_offset += nr_read;
return nr_read;
} else {
Expand All @@ -134,7 +134,7 @@ ssize_t rados_device::d_write(int fd, const void *buffer, size_t count)
int nr_written;

nr_written = rados_write(m_ctx, getVolCatName(), (char *)buffer, count, m_offset);
if (nr_written > 0) {
if (nr_written >= 0) {
m_offset += nr_written;
return nr_written;
} else {
Expand Down

0 comments on commit fcdcfb0

Please sign in to comment.