aboutsummaryrefslogtreecommitdiffstats
path: root/xattrs.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-07 16:41:09 -0800
committerWayne Davison <wayned@samba.org>2008-03-07 16:41:09 -0800
commitb4e6aac98543afdfab019339612673561c64f122 (patch)
tree3c6aef2216ef8872bbb8418fbc69f40605e482a4 /xattrs.c
parent7c21776e54446ed288b3225444c6eb9b5b9400d3 (diff)
downloadandroid_external_rsync-b4e6aac98543afdfab019339612673561c64f122.tar.gz
android_external_rsync-b4e6aac98543afdfab019339612673561c64f122.tar.bz2
android_external_rsync-b4e6aac98543afdfab019339612673561c64f122.zip
Fixed a syntax problem for non-HAVE_LINUX_ATTRS systems.
Diffstat (limited to 'xattrs.c')
-rw-r--r--xattrs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xattrs.c b/xattrs.c
index 53363bde..2441e116 100644
--- a/xattrs.c
+++ b/xattrs.c
@@ -350,15 +350,14 @@ int send_xattr(stat_x *sxp, int f)
int count = sxp->xattr->count;
write_varint(f, count);
for (rxa = sxp->xattr->items; count--; rxa++) {
- int name_len = rxa->name_len;
+ size_t name_len = rxa->name_len;
const char *name = rxa->name;
/* Strip the rsync prefix from disguised namespaces. */
- if (
+ if (name_len > RPRE_LEN
#ifdef HAVE_LINUX_XATTRS
- am_root < 0
+ && am_root < 0
#endif
- && name_len > RPRE_LEN && name[RPRE_LEN] != '%'
- && HAS_PREFIX(name, RSYNC_PREFIX)) {
+ && name[RPRE_LEN] != '%' && HAS_PREFIX(name, RSYNC_PREFIX)) {
name += RPRE_LEN;
name_len -= RPRE_LEN;
}
@@ -699,7 +698,8 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
ssize_t list_len;
size_t i, len;
char *name, *ptr, sum[MAX_DIGEST_LEN];
- int name_len, ret = 0;
+ size_t name_len;
+ int ret = 0;
/* This puts the current name list into the "namebuf" buffer. */
if ((list_len = get_xattr_names(fname)) < 0)