indentation fixes for ac-gfbs

remotes/origin/master-1.2.x
Anoop Saldanha 14 years ago committed by Victor Julien
parent 2eb3aff0af
commit 6e2c921037

@ -1316,27 +1316,22 @@ uint32_t SCACGfbsSearch(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
temp_state = SC_AC_GFBS_FAIL; temp_state = SC_AC_GFBS_FAIL;
} else { } else {
buf_local = u8_tolower(buf[i]); buf_local = u8_tolower(buf[i]);
//if (state == 0) { ascii_codes = (uint8_t *)(goto_table_mod_pointers[state & 0x7FFF] + 2);
// ascii_codes = goto_table_mod_pointers[state] + 2; int low = 0;
// temp_state = ((ascii_codes + no_of_entries))[buf_local]; int high = no_of_entries;
//} else { int mid;
ascii_codes = (uint8_t *)(goto_table_mod_pointers[state & 0x7FFF] + 2); temp_state = SC_AC_GFBS_FAIL;
int low = 0; while (low <= high) {
int high = no_of_entries; mid = (low + high) / 2;
int mid; if (ascii_codes[mid] == buf_local) {
temp_state = SC_AC_GFBS_FAIL; temp_state = ((uint16_t *)(ascii_codes + ((no_of_entries + 1) & 0xFFE)))[mid];
while (low <= high) { break;
mid = (low + high) / 2; } else if (ascii_codes[mid] < buf_local) {
if (ascii_codes[mid] == buf_local) { low = mid + 1;
temp_state = ((uint16_t *)(ascii_codes + ((no_of_entries + 1) & 0xFFE)))[mid]; } else {
break; high = mid - 1;
} else if (ascii_codes[mid] < buf_local) {
low = mid + 1;
} else {
high = mid - 1;
}
} }
//} }
} }
} }
while (temp_state == SC_AC_GFBS_FAIL) { while (temp_state == SC_AC_GFBS_FAIL) {
@ -1449,27 +1444,22 @@ uint32_t SCACGfbsSearch(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
temp_state = SC_AC_GFBS_FAIL; temp_state = SC_AC_GFBS_FAIL;
} else { } else {
buf_local = u8_tolower(buf[i]); buf_local = u8_tolower(buf[i]);
//if (state == 0) { ascii_codes = (uint8_t *)(goto_table_mod_pointers[state & 0x00FFFFFF] + 2);
// ascii_codes = goto_table_mod_pointers[state] + 2; int low = 0;
// temp_state = ((ascii_codes + no_of_entries))[buf_local]; int high = no_of_entries;
//} else { int mid;
ascii_codes = (uint8_t *)(goto_table_mod_pointers[state & 0x00FFFFFF] + 2); temp_state = SC_AC_GFBS_FAIL;
int low = 0; while (low <= high) {
int high = no_of_entries; mid = (low + high) / 2;
int mid; if (ascii_codes[mid] == buf_local) {
temp_state = SC_AC_GFBS_FAIL; temp_state = ((uint32_t *)(ascii_codes + ((no_of_entries + 3) & 0xFFC)))[mid];
while (low <= high) { break;
mid = (low + high) / 2; } else if (ascii_codes[mid] < buf_local) {
if (ascii_codes[mid] == buf_local) { low = mid + 1;
temp_state = ((uint32_t *)(ascii_codes + ((no_of_entries + 3) & 0xFFC)))[mid]; } else {
break; high = mid - 1;
} else if (ascii_codes[mid] < buf_local) {
low = mid + 1;
} else {
high = mid - 1;
}
} }
//} }
} }
} }
while (temp_state == SC_AC_GFBS_FAIL) { while (temp_state == SC_AC_GFBS_FAIL) {

Loading…
Cancel
Save