From 7d6ebe0de7d99c20854cafb8af50fe8f30ed778a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 May 2011 16:19:49 -0700 Subject: More const fixes. Remove CONST_DISCARD. --- source3/include/includes.h | 4 ---- source3/include/popt_common.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index 0079619372..59aa45afd7 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -652,10 +652,6 @@ char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATT #undef HAVE_MMAP #endif -#ifndef CONST_DISCARD -#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr))) -#endif - void dump_core(void) _NORETURN_; void exit_server(const char *const reason) _NORETURN_; void exit_server_cleanly(const char *const reason) _NORETURN_; diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index 70d7278f01..10dd2f4ebe 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -42,7 +42,7 @@ extern const struct poptOption popt_common_dynconfig[]; #define POPT_COMMON_CONFIGFILE { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_configfile, 0, "Common samba config:", NULL }, #define POPT_COMMON_CREDENTIALS { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_credentials, 0, "Authentication options:", NULL }, #define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \ - CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \ + discard_const_p(poptOption, popt_common_dynconfig), 0, \ "Build-time configuration overrides:", NULL }, #define POPT_COMMON_DEBUGLEVEL { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debuglevel, 0, "Common samba debugging:", NULL }, #define POPT_COMMON_OPTION { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_option, 0, "Common samba commandline config:", NULL }, -- cgit