mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-uuid: Code cleanups
Remove one level of indentation from the main function by jumping to the end immediately if the configuration list is empty. Other minor style cleanups.
This commit is contained in:
@@ -514,7 +514,6 @@ ipauuid_parse_config_entry(Slapi_Entry * e, bool apply)
|
||||
if (value) {
|
||||
entry->dn = slapi_ch_strdup(value);
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> dn [%s]\n", entry->dn);
|
||||
|
||||
entry->attr = slapi_entry_attr_get_charptr(e, IPAUUID_ATTR);
|
||||
@@ -524,21 +523,18 @@ ipauuid_parse_config_entry(Slapi_Entry * e, bool apply)
|
||||
ret = IPAUUID_FAILURE;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_ATTR, entry->attr);
|
||||
|
||||
value = slapi_entry_attr_get_charptr(e, IPAUUID_PREFIX);
|
||||
if (value && value[0]) {
|
||||
entry->prefix = value;
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_PREFIX, entry->prefix);
|
||||
|
||||
value = slapi_entry_attr_get_charptr(e, IPAUUID_GENERATE);
|
||||
if (value) {
|
||||
entry->generate = value;
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_GENERATE, entry->generate);
|
||||
|
||||
value = slapi_entry_attr_get_charptr(e, IPAUUID_FILTER);
|
||||
@@ -556,7 +552,6 @@ ipauuid_parse_config_entry(Slapi_Entry * e, bool apply)
|
||||
ret = IPAUUID_FAILURE;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_FILTER, value);
|
||||
|
||||
value = slapi_entry_attr_get_charptr(e, IPAUUID_SCOPE);
|
||||
@@ -568,7 +563,6 @@ ipauuid_parse_config_entry(Slapi_Entry * e, bool apply)
|
||||
ret = IPAUUID_FAILURE;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
LOG_CONFIG("----------> %s [%s]\n", IPAUUID_SCOPE, entry->scope);
|
||||
|
||||
/* If we were only called to validate config, we can
|
||||
@@ -879,7 +873,10 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
|
||||
ipauuid_read_lock();
|
||||
locked = true;
|
||||
|
||||
if (!PR_CLIST_IS_EMPTY(ipauuid_global_config)) {
|
||||
if (PR_CLIST_IS_EMPTY(ipauuid_global_config)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
list = PR_LIST_HEAD(ipauuid_global_config);
|
||||
|
||||
for(list = PR_LIST_HEAD(ipauuid_global_config);
|
||||
@@ -1069,7 +1066,7 @@ static int ipauuid_pre_op(Slapi_PBlock *pb, int modtype)
|
||||
/* free up */
|
||||
slapi_ch_free_string(&value);
|
||||
slapi_ch_free_string(&new_value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user