Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14738d3
)
Tweaked the increment style of a "for" loop.
author
Wayne Davison
<wayned@samba.org>
Sat, 4 Nov 2006 18:18:58 +0000
(18:18 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 4 Nov 2006 18:18:58 +0000
(18:18 +0000)
xattrs.diff
patch
|
blob
|
blame
|
history
diff --git
a/xattrs.diff
b/xattrs.diff
index
6ce2f24
..
9334471
100644
(file)
--- a/
xattrs.diff
+++ b/
xattrs.diff
@@
-288,7
+288,7
@@
TODO:
}
--- old/lib/sysxattr.c
+++ new/lib/sysxattr.c
}
--- old/lib/sysxattr.c
+++ new/lib/sysxattr.c
-@@ -0,0 +1,13
6
@@
+@@ -0,0 +1,13
5
@@
+/*
+ * Extended attribute support for rsync.
+ *
+/*
+ * Extended attribute support for rsync.
+ *
@@
-403,7
+403,7
@@
TODO:
+ * terminator. We need to change this into a series of null-terminted
+ * strings. Since the size is the same, we can simply transform the
+ * output in place. */
+ * terminator. We need to change this into a series of null-terminted
+ * strings. Since the size is the same, we can simply transform the
+ * output in place. */
-+ for (off = 0; off < len; ) {
++ for (off = 0; off < len;
off += keylen + 1
) {
+ keylen = ((unsigned char*)list)[off];
+ if (off + keylen >= len) {
+ /* Should be impossible, but kernel bugs happen! */
+ keylen = ((unsigned char*)list)[off];
+ if (off + keylen >= len) {
+ /* Should be impossible, but kernel bugs happen! */
@@
-411,8
+411,7
@@
TODO:
+ return -1;
+ }
+ memmove(list+off, list+off+1, keylen);
+ return -1;
+ }
+ memmove(list+off, list+off+1, keylen);
-+ off += keylen;
-+ list[off++] = '\0';
++ list[off+keylen] = '\0';
+ }
+
+ return len;
+ }
+
+ return len;