/* Get the mpm algo defined in config file by the user */
if ((ConfGet("mpm-algo", &mpm_algo)) == 1) {
- uint16_t u;
-
if (mpm_algo != NULL) {
#if __BYTE_ORDER == __BIG_ENDIAN
if (strcmp(mpm_algo, "ac-ks") == 0) {
if (strcmp("auto", mpm_algo) == 0) {
goto done;
}
- for (u = 0; u < MPM_TABLE_SIZE; u++) {
+ for (uint16_t u = 0; u < MPM_TABLE_SIZE; u++) {
if (mpm_table[u].name == NULL)
continue;
}
#ifndef BUILD_HYPERSCAN
- if ((mpm_algo != NULL) && (strcmp(mpm_algo, "hs") == 0)) {
- FatalError(SC_ERR_INVALID_VALUE, "Hyperscan (hs) support for mpm-algo is "
- "not compiled into Suricata.");
- }
+ if ((strcmp(mpm_algo, "hs") == 0)) {
+ FatalError(SC_ERR_INVALID_VALUE, "Hyperscan (hs) support for mpm-algo is "
+ "not compiled into Suricata.");
+ }
#endif
- SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, "Invalid mpm algo supplied "
+ FatalError(SC_ERR_INVALID_YAML_CONF_ENTRY, "Invalid mpm algo supplied "
"in the yaml conf file: \"%s\"", mpm_algo);
- exit(EXIT_FAILURE);
}
done: