param: remove now unused FN_GLOBAL_STRING macro
authorRalph Boehme <slow@samba.org>
Tue, 19 Nov 2019 09:30:46 +0000 (10:30 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:37 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/param/loadparm.c
source3/param/loadparm.c

index 1919e0bc477e0231fa40a1d1e9812876446d73a3..572d8bff7acf48be76ae57fa0e0eabb20204076b 100644 (file)
@@ -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) \
index 0249c7f2b747ed9b281849ceb94ae5b09e312f3a..0ed469e86fd1706ea501756088bad5f2ddf178a6 100644 (file)
@@ -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) : "");}