Error checking for mpatch.c

Matt Mackall mpm at selenic.com
Sat May 21 12:36:09 CDT 2005


On Sat, May 21, 2005 at 02:28:12PM +0200, Thomas Arendsen Hein wrote:
> * Christopher Li <hg at chrisli.org> [20050521 11:18]:
> > Avoid crash on bad bins.
> > --- hg.orig/mercurial/mpatch.c	2005-05-20 21:33:11.000000000 -0400
> > +++ hg/mercurial/mpatch.c	2005-05-21 01:58:22.000000000 -0400
> 
> Attached are two patches (One fix and goto-remove, one cosmetic) to
> be applied after this patch, just look at their descriptions.

Can we get a single patch? 

> +	if (a && b && (c = lalloc((lsize(a) + lsize(b)) * 2))) {

Ugh. Assignment in if.

> +		bh = b->head;
> +		while (bh != b->tail) {

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list