Commit Diff


commit - 8bd7d41ff41f26775d745d1e511af43a24013e94
commit + 2b0f870899f49223307dd81a4e2d4d63ca2ea936
blob - 25e677acde4b2f4134a80545ab78564c5dbb42c0
blob + 7a63e8958713ab55fbb7ebf87ebe4dd11663e85e
--- diff_atomize_text.c
+++ diff_atomize_text.c
@@ -27,8 +27,8 @@ static int
 diff_data_atomize_text_lines(struct diff_data *d)
 {
 	const uint8_t *pos = d->data;
-	const uint8_t *end = pos + d->len;
-	unsigned int array_size_estimate = d->len / 50;
+	const uint8_t *end = pos + d->dlen;
+	unsigned int array_size_estimate = d->dlen / 50;
 	unsigned int pow2 = 1;
 
 	while (array_size_estimate >>= 1)
blob - 817b64e4dc653ae767c4651a33ad9578c95b11c0
blob + fce8dd1f1c4aba5c7ee0824dcfa879df54b90655
--- diff_main.c
+++ diff_main.c
@@ -68,11 +68,11 @@ diff_state_add_chunk(struct diff_state *state, bool so
 }
 
 void
-diff_data_init_root(struct diff_data *d, const uint8_t *data, size_t len)
+diff_data_init_root(struct diff_data *d, const uint8_t *data, size_t dlen)
 {
 	*d = (struct diff_data) {
 		.data = data,
-		.len = len,
+		.dlen = dlen,
 		.root = d,
 	};
 }
@@ -85,7 +85,7 @@ diff_data_init_subsection(struct diff_data *d, struct 
 
 	*d = (struct diff_data) {
 		.data = from_atom->at,
-		.len = (last_atom->at + last_atom->len) - from_atom->at,
+		.dlen = (last_atom->at + last_atom->len) - from_atom->at,
 		.root = parent->root,
 		.atoms.head = from_atom,
 		.atoms.len = atoms_count,
blob - 0a10963543eaacf9c45f90cad201f4c1b938fd02
blob + da1ebcfe0b9a1a629385cd999582df368828e91f
--- diff_main.h
+++ diff_main.h
@@ -119,8 +119,8 @@ diff_atom_same(const struct diff_atom *left, const str
  * struct is referencing a subset of atoms.
  */
 struct diff_data {
-	const uint8_t *data;
-	size_t len;
+	const uint8_t	*data;		/* data to compare */
+	size_t		 dlen;		/* size of the buffer */
 	ARRAYLIST_HEAD(, diff_atom) atoms;
 	struct diff_data *root;
 };