[PATCH 1 of 2] bdiff: document that bdiff_freehunks() accepts NULL

Yuya Nishihara yuya at tcha.org
Thu Jun 14 11:38:05 UTC 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1528975516 -32400
#      Thu Jun 14 20:25:16 2018 +0900
# Node ID d248414ffa9b640306c714eec13d3ed8cb8a671b
# Parent  1445b556e9d2489430c21f7a3cbbbd89e72d23c3
bdiff: document that bdiff_freehunks() accepts NULL

blocks() of cext/bdiff.c may pass NULL on OOM.

diff --git a/mercurial/bdiff.c b/mercurial/bdiff.c
--- a/mercurial/bdiff.c
+++ b/mercurial/bdiff.c
@@ -310,6 +310,7 @@ int bdiff_diff(struct bdiff_line *a, int
 	return count;
 }
 
+/* deallocate list of hunks; l may be NULL */
 void bdiff_freehunks(struct bdiff_hunk *l)
 {
 	struct bdiff_hunk *n;


More information about the Mercurial-devel mailing list