xref: /freebsd/contrib/libdiff/test/expect104.diff (revision 6580f5c38dd5b01aeeaed16b370f1a12423437f0)
1--- test104.left-P.txt
2+++ test104.right-P.txt
3@@ -1,3 +1,10 @@
4+int Chunk_bounds_check(Chunk *chunk, size_t start, size_t n)
5+{
6+    if (chunk == NULL) return 0;
7+
8+    return start <= chunk->length && n <= chunk->length - start;
9+}
10+
11 void Chunk_copy(Chunk *src, size_t src_start, Chunk *dst, size_t dst_start, size_t n)
12 {
13     if (!Chunk_bounds_check(src, src_start, n)) return;
14@@ -5,10 +12,3 @@
15
16     memcpy(dst->data + dst_start, src->data + src_start, n);
17 }
18-
19-int Chunk_bounds_check(Chunk *chunk, size_t start, size_t n)
20-{
21-    if (chunk == NULL) return 0;
22-
23-    return start <= chunk->length && n <= chunk->length - start;
24-}
25