From: Ralph Boehme Date: Tue, 19 Nov 2019 09:30:46 +0000 (+0100) Subject: param: remove now unused FN_GLOBAL_STRING macro X-Git-Tag: ldb-2.1.0~510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e81d9460bf4f0640ef7c679cd539e614929343e;p=thirdparty%2Fsamba.git param: remove now unused FN_GLOBAL_STRING macro Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 1919e0bc477..572d8bff7ac 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -158,15 +158,6 @@ static const char *lpcfg_string(const char *s) /* this global context supports the lp_*() function varients */ static struct loadparm_context *global_loadparm_context; -#define FN_GLOBAL_STRING(fn_name,var_name) \ - _PUBLIC_ char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx, TALLOC_CTX *ctx) {\ - if (lp_ctx == NULL) return NULL; \ - if (lp_ctx->s3_fns) { \ - return lp_ctx->globals->var_name ? lp_ctx->s3_fns->lp_string(ctx, lp_ctx->globals->var_name) : talloc_strdup(ctx, ""); \ - } \ - return lp_ctx->globals->var_name ? talloc_strdup(ctx, lpcfg_string(lp_ctx->globals->var_name)) : talloc_strdup(ctx, ""); \ -} - #define FN_GLOBAL_SUBSTITUTED_STRING(fn_name,var_name) \ _PUBLIC_ char *lpcfg_ ## fn_name(struct loadparm_context *lp_ctx, \ const struct loadparm_substitution *lp_sub, TALLOC_CTX *mem_ctx) \ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0249c7f2b74..0ed469e86fd 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1047,8 +1047,6 @@ char *lp_string(TALLOC_CTX *ctx, const char *s) parameters from the rest of the program are defined */ -#define FN_GLOBAL_STRING(fn_name,ptr) \ -char *lp_ ## fn_name(TALLOC_CTX *ctx) {return(lp_string((ctx), *(char **)(&Globals.ptr) ? *(char **)(&Globals.ptr) : ""));} #define FN_GLOBAL_SUBSTITUTED_STRING(fn_name,ptr) \ char *lp_ ## fn_name(TALLOC_CTX *ctx, const struct loadparm_substitution *lp_sub) \ {return lpcfg_substituted_string(ctx, lp_sub, *(char **)(&Globals.ptr) ? *(char **)(&Globals.ptr) : "");}