diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index c9e22d10fbe..d56e5fa10da 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -6323,7 +6323,7 @@ glfs_anonymous_pwritev(struct glfs *fs, struct glfs_object *object, inode_t *inode = NULL; fd_t *fd = NULL; int ret = -1; - size_t size = -1; + size_t size = 0; DECLARE_OLD_THIS; __GLFS_ENTRY_VALIDATE_FS(fs, invalid_fs); diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 2d765a0d60f..eb453021dc5 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -981,7 +981,7 @@ iobuf_copy(struct iobuf_pool *iobuf_pool, const struct iovec *iovec_src, int iovcnt, struct iobref **iobref, struct iobuf **iobuf, struct iovec *iov_dst) { - size_t size = -1; + size_t size = 0; int ret = 0; size = iov_length(iovec_src, iovcnt);