[PATCH 2/2] storage: gluster: Fix header reader function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Advance the right pointer to actually append to the buffer. We were
lucky that all reads were completed in one try.
---
 src/storage/storage_backend_gluster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
index cab23b0..1a2b4ec 100644
--- a/src/storage/storage_backend_gluster.c
+++ b/src/storage/storage_backend_gluster.c
@@ -173,7 +173,7 @@ virStorageBackendGlusterReadHeader(glfs_fd_t *fd,
         }
         if (r == 0)
             return nread;
-        buf += r;
+        s += r;
         maxlen -= r;
         nread += r;
     }
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]