refactor/reduce the tests on the start/end positions.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1162440 13f79535-47bb-0310-9956-
ffa450edef68
continue;
}
in_merge = 0;
+
+ if (start >= ostart && end <= oend) {
+ in_merge = 1;
+ }
- if (!(end <= ostart || start-1 >= oend)) {
- if (start < ostart) {
- ostart = start;
- reversals++;
- in_merge = 1;
- }
- else if (start < oend || start == ostart) {
- in_merge = 1;
- }
- if (end >= oend && (start-1) <= oend) {
- oend = end;
- in_merge = 1;
- }
- else if (end > ostart && end <= oend) {
- in_merge = 1;
- }
+ if (start < ostart && end >= ostart-1) {
+ ostart = start;
+ reversals++;
+ in_merge = 1;
}
+ if (end >= oend && start <= oend+1 ) {
+ oend = end;
+ in_merge = 1;
+ }
+
if (in_merge) {
overlaps++;
continue;