diff options
author | Zhou Zhengping <johnzzpcrystal@gmail.com> | 2017-03-31 00:42:46 +0800 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-05-05 15:04:17 +0000 |
commit | fe83a4ae84dd4345d6e958219d5a1dc59ecb039d (patch) | |
tree | ee99ad6503e434e11fb9c85d0da38c7a26c9dc1b /xlators/cluster | |
parent | fa10c8a3528b95dc575bfedd30bcd68cc2dff25b (diff) |
coreutils: use coreutils instead of duplicate code
Change-Id: I0e442331d2bbb22ec18c37af87ab2a8852737c43
BUG: 1448265
Signed-off-by: Zhou Zhengping <johnzzpcrystal@gmail.com>
Reviewed-on: https://review.gluster.org/16975
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/stripe/src/stripe.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index fb10fd2a302..67006ab06b6 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -3674,9 +3674,7 @@ stripe_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, STRIPE_VALIDATE_FCTX (fctx, err); /* File has to be stripped across the child nodes */ - for (idx = 0; idx< count; idx ++) { - total_size += vector[idx].iov_len; - } + total_size = iov_length (vector, count); remaining_size = total_size; local = mem_get0 (this->local_pool); |