From 0128bd6d3f06fd433ec3747686da1e1a1133ab3d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 31 Dec 2004 01:03:57 +0000 Subject: r4423: give lp_parm_int() and lp_parm_ulong() default values metze (This used to be commit c44f4d44b51789916e50c9da93046d0a15245edc) --- source4/param/loadparm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/param/loadparm.c') diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 1ecc53fac0..eabf70b6d0 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -1436,27 +1436,27 @@ char **lp_parm_string_list(int lookup_service, const char *type, const char *opt /* Return parametric option from a given service. Type is a part of option before ':' */ /* Parametric option has following syntax: 'Type: option = value' */ -int lp_parm_int(int lookup_service, const char *type, const char *option) +int lp_parm_int(int lookup_service, const char *type, const char *option, int default_v) { const char *value = get_parametrics(lookup_service, type, option); if (value) return lp_int(value); - return (-1); + return default_v; } /* Return parametric option from a given service. Type is a part of option before ':' */ /* Parametric option has following syntax: 'Type: option = value' */ -unsigned long lp_parm_ulong(int lookup_service, const char *type, const char *option) +unsigned long lp_parm_ulong(int lookup_service, const char *type, const char *option, unsigned long default_v) { const char *value = get_parametrics(lookup_service, type, option); if (value) return lp_ulong(value); - return (0); + return default_v; } /* Return parametric option from a given service. Type is a part of option before ':' */ -- cgit