1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

lib/param: use lp_set_enum_parm

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Garming Sam 2014-02-21 15:47:27 +13:00 committed by Jeremy Allison
parent a540792257
commit a8cfa8b1f2

View File

@ -1479,19 +1479,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
break;
case P_ENUM:
for (i = 0; parm_table[parmnum].enum_list[i].name; i++) {
if (strequal
(pszParmValue,
parm_table[parmnum].enum_list[i].name)) {
*(int *)parm_ptr =
parm_table[parmnum].
enum_list[i].value;
break;
}
}
if (!parm_table[parmnum].enum_list[i].name) {
DEBUG(0,("Unknown enumerated value '%s' for '%s'\n",
pszParmValue, pszParmName));
if (!lp_set_enum_parm(&parm_table[parmnum], pszParmValue, (int*)parm_ptr)) {
return false;
}
break;