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

login
register
mail settings
Submitter Yuya Nishihara
Date June 14, 2018, 11:38 a.m.
Message ID <d248414ffa9b640306c7.1528976285@mimosa>
Download mbox | patch
Permalink /patch/32127/
State Accepted
Headers show

Comments

Yuya Nishihara - June 14, 2018, 11:38 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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;