mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
param: remove unnecessary lp_local_ptr_by_snum function
The function only appears twice and it can be easily inlined without any real loss to meaning or readability. Change-Id: Iabf6d202cedd95ad4f223e89c7d3be8dfbe36389 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
This commit is contained in:
parent
6ad9333784
commit
ee722f48c4
@ -536,7 +536,7 @@ static void free_one_parameter_by_snum(int snum, struct parm_struct parm)
|
||||
} else if (parm.p_class != P_LOCAL) {
|
||||
return;
|
||||
} else {
|
||||
parm_ptr = lp_local_ptr_by_snum(snum, &parm);
|
||||
parm_ptr = lp_parm_ptr(ServicePtrs[snum], &parm);
|
||||
}
|
||||
|
||||
free_one_parameter_common(parm_ptr, parm);
|
||||
@ -2537,15 +2537,6 @@ void *lp_parm_ptr(struct loadparm_service *service, struct parm_struct *parm)
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Return the local pointer to a parameter given the service number and parameter
|
||||
***************************************************************************/
|
||||
|
||||
void *lp_local_ptr_by_snum(int snum, struct parm_struct *parm)
|
||||
{
|
||||
return lp_parm_ptr(ServicePtrs[snum], parm);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Process a parameter for a particular service number. If snum < 0
|
||||
then assume we are in the globals.
|
||||
@ -2608,7 +2599,7 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
|
||||
TALLOC_FREE(frame);
|
||||
return true;
|
||||
}
|
||||
parm_ptr = lp_local_ptr_by_snum(snum, &parm_table[parmnum]);
|
||||
parm_ptr = lp_parm_ptr(ServicePtrs[snum], &parm_table[parmnum]);
|
||||
}
|
||||
|
||||
if (snum >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user