1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

param: remove duplicate lp_int function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
This commit is contained in:
Garming Sam 2014-02-21 15:13:58 +13:00 committed by Jeremy Allison
parent f6697ef8da
commit 45184c9758
2 changed files with 2 additions and 16 deletions

View File

@ -327,10 +327,10 @@ const char *lpcfg_get_parametric(struct loadparm_context *lp_ctx,
/**
* convenience routine to return int parameters.
*/
static int lp_int(const char *s)
int lp_int(const char *s)
{
if (!s) {
if (!s || !*s) {
DEBUG(0,("lp_int(%s): is called with NULL!\n",s));
return -1;
}

View File

@ -1252,20 +1252,6 @@ static struct parmlist_entry *get_parametrics(int snum, const char *type,
#define MISSING_PARAMETER(name) \
DEBUG(0, ("%s(): value is NULL or empty!\n", #name))
/*******************************************************************
convenience routine to return int parameters.
********************************************************************/
static int lp_int(const char *s)
{
if (!s || !*s) {
MISSING_PARAMETER(lp_int);
return (-1);
}
return (int)strtol(s, NULL, 0);
}
/*******************************************************************
convenience routine to return unsigned long parameters.
********************************************************************/