changeset 13090:c73745762f33

bdiff: Fix bogus NULL return
author Matt Mackall <mpm@selenic.com>
date Mon, 06 Dec 2010 16:59:43 -0600
parents faee0ffbc24b
children 8cecea387574
files mercurial/bdiff.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bdiff.c	Mon Dec 06 16:42:48 2010 -0600
+++ b/mercurial/bdiff.c	Mon Dec 06 16:59:43 2010 -0600
@@ -275,7 +275,7 @@
 		/* sentinel end hunk */
 		curr->next = (struct hunk *)malloc(sizeof(struct hunk));
 		if (!curr->next)
-			return NULL;
+			return -1;
 		curr = curr->next;
 		curr->a1 = curr->a2 = an;
 		curr->b1 = curr->b2 = bn;