Mercurial > hg > mercurial-crew-with-dirclash
changeset 82:7ed96baa7caa
Gotos are embarrassing.
author | mpm@selenic.com |
---|---|
date | Tue, 17 May 2005 10:13:00 -0800 |
parents | 17884f79d59d |
children | 9fd5b35cfc45 |
files | mercurial/mpatch.c |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mpatch.c +++ b/mercurial/mpatch.c @@ -67,7 +67,7 @@ static int gather(struct flist *dest, st 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 @@ static int gather(struct flist *dest, st 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 @@ static int discard(struct flist *src, in 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 @@ static int discard(struct flist *src, in s->len = s->len - l; s->data = s->data + l; - goto exit; + break; } } - exit: src->head = s; return offset; }