Gotos are embarrassing.
--- a/mercurial/mpatch.c Tue May 17 01:27:14 2005 -0800
+++ b/mercurial/mpatch.c Tue May 17 10:13:00 2005 -0800
@@ -67,7 +67,7 @@
while (s != src->tail) {
if (s->start + offset >= cut)
- goto exit; /* we've gone far enough */
+ break; /* we've gone far enough */
postend = offset + s->start + s->len;
if (postend <= cut) {
@@ -95,11 +95,10 @@
s->len = s->len - l;
s->data = s->data + l;
- goto exit;
+ break;
}
}
- exit:
dest->tail = d;
src->head = s;
return offset;
@@ -113,7 +112,7 @@
while (s != src->tail) {
if (s->start + offset >= cut)
- goto exit;
+ break;
postend = offset + s->start + s->len;
if (postend <= cut) {
@@ -133,11 +132,10 @@
s->len = s->len - l;
s->data = s->data + l;
- goto exit;
+ break;
}
}
- exit:
src->head = s;
return offset;
}