From: Garming Sam Date: Tue, 25 Feb 2014 04:07:31 +0000 (+1300) Subject: lib/param: remove unnecessary get_parametric s3 helper function X-Git-Url: http://git.samba.org/?p=mat%2Fsamba.git;a=commitdiff_plain;h=dfc999ef90e436e3df1be74469ac3cdf27dd628a lib/param: remove unnecessary get_parametric s3 helper function Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Reviewed-by: Jeremy Allison --- diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index fd0c827d1a..7fcda4405b 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -295,10 +295,6 @@ const char *lpcfg_get_parametric(struct loadparm_context *lp_ctx, if (lp_ctx == NULL) return NULL; - if (lp_ctx->s3_fns) { - return lp_ctx->s3_fns->get_parametric(service, type, option, NULL); - } - data = get_parametric_helper(service, type, option, lp_ctx->globals->param_opt); diff --git a/lib/param/s3_param.h b/lib/param/s3_param.h index 3c8c717c49..75f9eda9d4 100644 --- a/lib/param/s3_param.h +++ b/lib/param/s3_param.h @@ -3,8 +3,6 @@ struct loadparm_s3_helpers { - const char * (*get_parametric)(struct loadparm_service *, const char *type, - const char *option, const char *def); struct parm_struct * (*get_parm_struct)(const char *param_name); void * (*get_parm_ptr)(struct loadparm_service *service, struct parm_struct *parm); struct loadparm_service * (*get_service)(const char *service_name); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 095a25816c..844cfe903d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1240,20 +1240,6 @@ const char *lp_parm_const_string(int snum, const char *type, const char *option, return data->value; } -const char *lp_parm_const_string_service(struct loadparm_service *service, - const char *type, const char *option, - const char *def) -{ - struct parmlist_entry *data; - - data = get_parametric_helper(service, type, option, Globals.param_opt); - - if (data == NULL||data->value==NULL) - return def; - - return data->value; -} - /* Return parametric option from a given service. Type is a part of option before ':' */ /* Parametric option has following syntax: 'Type: option = value' */ diff --git a/source3/param/loadparm_ctx.c b/source3/param/loadparm_ctx.c index 0e237e417c..32df1836f3 100644 --- a/source3/param/loadparm_ctx.c +++ b/source3/param/loadparm_ctx.c @@ -58,7 +58,6 @@ static bool lp_load_for_s4_ctx(const char *filename) static struct loadparm_s3_helpers s3_fns = { - .get_parametric = lp_parm_const_string_service, .get_parm_struct = lp_get_parameter, .get_parm_ptr = lp_parm_ptr, .get_service = lp_service_for_s4_ctx,