Hi All,
Trying to understand the vdelta implementation in subversion.
I have the following clarity suggestion to the code.
In the vdelta(): current_match_len can either be 0 or >= to VD_KEY_SIZE.
The 'no-match check' of (current_match_len < VD_KEY_SIZE) can be
simplified to
(!current_match_len) for clarity.
Ran make check and it is successful.
Find the attached patch.
With regards
Kamesh Jayachandran
[[[
Clarity fix.
Patch by: Kamesh Jayachandran <kamesh@collab.net>
* subversion/libsvn_delta/vdelta.c
(vdelta): The current_match_len can either be 0 or greater than
or equal to VD_KEY_SIZE.
The 'no-match check' of (current_match_len < VD_KEY_SIZE) can be
simplified to (!current_match_len) for clarity.
]]]
Index: subversion/libsvn_delta/vdelta.c
===================================================================
--- subversion/libsvn_delta/vdelta.c (revision 19309)
+++ subversion/libsvn_delta/vdelta.c (working copy)
@@ -255,7 +255,7 @@
}
while (progress && end - key >= VD_KEY_SIZE);
- if (current_match_len < VD_KEY_SIZE)
+ if (!current_match_len)
{
/* There is no match here; store a mapping and insert this byte. */
store_mapping(table, here, here - data);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 12 20:13:05 2006