btrfs-progs: Remove unused parameter
[platform/upstream/btrfs-progs.git] / send-stream.c
index 920c742..78f2571 100644 (file)
@@ -74,7 +74,7 @@ static int read_buf(struct btrfs_send_stream *sctx, char *buf, size_t len)
        ret = 0;
 
 out_eof:
-       if (pos < len) {
+       if (0 < pos && pos < len) {
                error("short read from stream: expected %zu read %zu", len, pos);
                ret = -EIO;
        } else {
@@ -492,7 +492,7 @@ int btrfs_read_and_process_send_stream(int fd,
        if (ret < 0)
                goto out;
        if (ret) {
-               ret = 1;
+               ret = -ENODATA;
                goto out;
        }