mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
param: attempt to align the set_variable_helper with lp_do_parameter
This should allow some of it to be factored out into lib/param. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org> Change-Id: I7d0b3b4114c73aeaf9bf63e8c5fcd0a9d00cfc00
This commit is contained in:
parent
867ed27ee9
commit
f47df32fd1
@ -2641,6 +2641,8 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
|
||||
return ok;
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
|
||||
/* now switch on the type of variable it is */
|
||||
switch (parm_table[parmnum].type)
|
||||
{
|
||||
@ -2664,7 +2666,6 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
|
||||
i = sscanf(pszParmValue, "%o", (int *)parm_ptr);
|
||||
if ( i != 1 ) {
|
||||
DEBUG ( 0, ("Invalid octal number %s\n", pszParmName ));
|
||||
TALLOC_FREE(frame);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -2740,7 +2741,6 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
|
||||
}
|
||||
case P_ENUM:
|
||||
if (!lp_set_enum_parm(&parm_table[parmnum], pszParmValue, (int*)parm_ptr)) {
|
||||
TALLOC_FREE(frame);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -2748,7 +2748,6 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
|
||||
break;
|
||||
}
|
||||
|
||||
TALLOC_FREE(frame);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user