const struct auth_passdb_post_settings *auth_post = NULL;
const struct ldap_pre_settings *ldap_pre = NULL;
struct ldap_passdb_module *module;
- struct ldap_connection *conn;
int ret = -1;
if (settings_get(event, &auth_passdb_post_setting_parser_info,
goto failed;
module = p_new(pool, struct ldap_passdb_module, 1);
- module->conn = conn = db_ldap_init(event);
+ module->conn = db_ldap_init(event);
db_ldap_get_attribute_names(pool, &auth_post->fields,
&module->attributes,
const struct ldap_post_settings *ldap_post = NULL;
const struct ldap_pre_settings *ldap_pre = NULL;
struct ldap_userdb_module *module;
- struct ldap_connection *conn;
int ret = -1;
if (settings_get(event, &auth_userdb_post_setting_parser_info,
goto failed;
module = p_new(pool, struct ldap_userdb_module, 1);
- module->conn = conn = db_ldap_init(event);
+ module->conn = db_ldap_init(event);
db_ldap_get_attribute_names(pool, &auth_post->fields,
&module->attributes,
while (*error_r == NULL && lua_next(L, -2) != 0) {
const char *key = lua_tostring(L, -2);
const char *value = lua_tostring(L, -1);
- const char *real_key = key;
+ const char *real_key;
unsigned int idx ATTR_UNUSED;
/* ignore event_parent */
if (strcmp(key, "event_parent") == 0) {
/* This needs a bit more roundabout way to check this as SSL settings
are lazily evaluated. */
- ret = dlua_pcall(script->L, "test_invalid_set_value_3", 0, 0, &error);
+ test_assert(dlua_pcall(script->L, "test_invalid_set_value_3", 0, 0, &error) == 0);
lua_pushstring(script->L, "https://localhost");
- ret = dlua_pcall(script->L, "http_request_post", 1, 2, &error);
+ test_assert(dlua_pcall(script->L, "http_request_post", 1, 2, &error) == 2);
error = lua_tostring(script->L, 2);
test_assert_strcmp(error, "Couldn't initialize SSL client context: Can't set minimum protocol to 'cow' (ssl_min_protocol setting): Unknown value");
return 1;
}
- const struct setting_define *def = info->defines;
+ const struct setting_define *def;
/* Sort filter arrays when order is defined */
for (def = info->defines; def->key != NULL; def++) {
if (array_count(hostnames) == 0) {
/* no hosts specified. create a default one. */
- host = array_append_space(&db->hosts);
+ array_append_zero(&db->hosts);
} else {
array_foreach_elem(hostnames, hostname) {
host = array_append_space(&db->hosts);
str_append(dest, stmt->function);
str_append_c(dest, '\1');
const struct var_expand_parameter *param = stmt->params;
- param = stmt->params;
while (param != NULL) {
if (param->key != NULL)
str_append(dest, param->key);