param: remove duplicate lp_ulong function
authorGarming Sam <garming@catalyst.net.nz>
Fri, 21 Feb 2014 02:16:26 +0000 (15:16 +1300)
committerJeremy Allison <jra@samba.org>
Wed, 7 May 2014 17:49:16 +0000 (19:49 +0200)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/loadparm.c
source3/param/loadparm.c

index 39cdae7b131e0e2db0dcf0a7eadbbcc7111de660..ef745cf61b0c9ae270f6c8c5089d12662baa2efb 100644 (file)
@@ -341,10 +341,10 @@ int lp_int(const char *s)
 /**
  * convenience routine to return unsigned long parameters.
  */
-static unsigned long lp_ulong(const char *s)
+unsigned long lp_ulong(const char *s)
 {
 
-       if (!s) {
+       if (!s || !*s) {
                DEBUG(0,("lp_ulong(%s): is called with NULL!\n",s));
                return -1;
        }
index ff3ff92216d1931dfc1061adcdb5e94962331a22..955d4898ca0a84cfee6ab14c177998af97eddf9c 100644 (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 unsigned long parameters.
-********************************************************************/
-static unsigned long lp_ulong(const char *s)
-{
-
-       if (!s || !*s) {
-               MISSING_PARAMETER(lp_ulong);
-               return (0);
-       }
-
-       return strtoul(s, NULL, 0);
-}
-
 /*******************************************************************
 convenience routine to return boolean parameters.
 ********************************************************************/