##// END OF EJS Templates
Gotos are embarrassing.
mpm@selenic.com -
r82:7ed96baa default
parent child Browse files
Show More
@@ -67,7 +67,7 b' static int gather(struct flist *dest, st'
67
67
68 while (s != src->tail) {
68 while (s != src->tail) {
69 if (s->start + offset >= cut)
69 if (s->start + offset >= cut)
70 goto exit; /* we've gone far enough */
70 break; /* we've gone far enough */
71
71
72 postend = offset + s->start + s->len;
72 postend = offset + s->start + s->len;
73 if (postend <= cut) {
73 if (postend <= cut) {
@@ -95,11 +95,10 b' static int gather(struct flist *dest, st'
95 s->len = s->len - l;
95 s->len = s->len - l;
96 s->data = s->data + l;
96 s->data = s->data + l;
97
97
98 goto exit;
98 break;
99 }
99 }
100 }
100 }
101
101
102 exit:
103 dest->tail = d;
102 dest->tail = d;
104 src->head = s;
103 src->head = s;
105 return offset;
104 return offset;
@@ -113,7 +112,7 b' static int discard(struct flist *src, in'
113
112
114 while (s != src->tail) {
113 while (s != src->tail) {
115 if (s->start + offset >= cut)
114 if (s->start + offset >= cut)
116 goto exit;
115 break;
117
116
118 postend = offset + s->start + s->len;
117 postend = offset + s->start + s->len;
119 if (postend <= cut) {
118 if (postend <= cut) {
@@ -133,11 +132,10 b' static int discard(struct flist *src, in'
133 s->len = s->len - l;
132 s->len = s->len - l;
134 s->data = s->data + l;
133 s->data = s->data + l;
135
134
136 goto exit;
135 break;
137 }
136 }
138 }
137 }
139
138
140 exit:
141 src->head = s;
139 src->head = s;
142 return offset;
140 return offset;
143 }
141 }
General Comments 0
You need to be logged in to leave comments. Login now