inlen += sub->sa_final->bv_len;
}
- if( inlen > left.bv_len ) {
- match = 1;
- goto done;
- }
-
if( sub->sa_initial ) {
+ if( inlen > left.bv_len ) {
+ match = 1;
+ goto done;
+ }
+
match = strncmp( sub->sa_initial->bv_val, left.bv_val,
sub->sa_initial->bv_len );
left.bv_val += sub->sa_initial->bv_len;
left.bv_len -= sub->sa_initial->bv_len;
inlen -= sub->sa_initial->bv_len;
+ }
+ if( sub->sa_final ) {
if( inlen > left.bv_len ) {
match = 1;
goto done;
}
- }
- if( sub->sa_final ) {
match = strncmp( sub->sa_final->bv_val,
&left.bv_val[left.bv_len - sub->sa_final->bv_len],
sub->sa_final->bv_len );
left.bv_len -= sub->sa_final->bv_len;
inlen -= sub->sa_final->bv_len;
-
- if( inlen > left.bv_len ) {
- match = 1;
- goto done;
- }
}
if( sub->sa_any ) {
char *p;
retry:
+ if( inlen > left.bv_len ) {
+ /* not enough length */
+ match = 1;
+ goto done;
+ }
+
if( sub->sa_any[i]->bv_len == 0 ) {
continue;
}
sub->sa_any[i]->bv_len );
if( match != 0 ) {
+ left.bv_val++;
+ left.bv_len--;
goto retry;
}
left.bv_val += sub->sa_any[i]->bv_len;
left.bv_len -= sub->sa_any[i]->bv_len;
inlen -= sub->sa_any[i]->bv_len;
-
- if( inlen > left.bv_len ) {
- /* not enough length */
- match = 1;
- goto done;
- }
}
}
inlen += sub->sa_final->bv_len;
}
- if( inlen > left.bv_len ) {
- match = 1;
- goto done;
- }
-
if( sub->sa_initial ) {
+ if( inlen > left.bv_len ) {
+ match = 1;
+ goto done;
+ }
+
match = strncasecmp( sub->sa_initial->bv_val, left.bv_val,
sub->sa_initial->bv_len );
left.bv_val += sub->sa_initial->bv_len;
left.bv_len -= sub->sa_initial->bv_len;
inlen -= sub->sa_initial->bv_len;
+ }
+ if( sub->sa_final ) {
if( inlen > left.bv_len ) {
match = 1;
goto done;
}
- }
- if( sub->sa_final ) {
match = strncasecmp( sub->sa_final->bv_val,
&left.bv_val[left.bv_len - sub->sa_final->bv_len],
sub->sa_final->bv_len );
left.bv_len -= sub->sa_final->bv_len;
inlen -= sub->sa_final->bv_len;
-
- if( inlen > left.bv_len ) {
- match = 1;
- goto done;
- }
}
if( sub->sa_any ) {
char *p;
retry:
+ if( inlen > left.bv_len ) {
+ /* not enough length */
+ match = 1;
+ goto done;
+ }
+
if( sub->sa_any[i]->bv_len == 0 ) {
continue;
}
sub->sa_any[i]->bv_len );
if( match != 0 ) {
+ left.bv_val++;
+ left.bv_len--;
+
goto retry;
}
left.bv_val += sub->sa_any[i]->bv_len;
left.bv_len -= sub->sa_any[i]->bv_len;
inlen -= sub->sa_any[i]->bv_len;
-
- if( inlen > left.bv_len ) {
- /* not enough length */
- match = 1;
- goto done;
- }
}
}