summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 16:19:49 -0700
committerJeremy Allison <jra@samba.org>2011-05-06 01:44:07 +0200
commit7d6ebe0de7d99c20854cafb8af50fe8f30ed778a (patch)
tree718a3cfdae0a8c6db47245d028bd043c4df0c09e /source3/utils
parent76f5a39c7f165c656cdc9db29bfa0df59514fceb (diff)
downloadsamba-7d6ebe0de7d99c20854cafb8af50fe8f30ed778a.tar.gz
samba-7d6ebe0de7d99c20854cafb8af50fe8f30ed778a.tar.bz2
samba-7d6ebe0de7d99c20854cafb8af50fe8f30ed778a.zip
More const fixes. Remove CONST_DISCARD.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/eventlogadm.c2
-rw-r--r--source3/utils/net_printing.c2
-rw-r--r--source3/utils/ntlm_auth.c6
-rw-r--r--source3/utils/smbcontrol.c4
-rw-r--r--source3/utils/smbget.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index 9ddd9c7df8..971a0c040a 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -178,7 +178,7 @@ static bool eventlog_add_source( const char *eventlog, const char *sourcename,
return False;
}
memcpy( wp, wrklist, sizeof( char * ) * numsources );
- *( wp + numsources ) = ( char * ) sourcename;
+ *( wp + numsources ) = (const char * ) sourcename;
*( wp + numsources + 1 ) = NULL;
if (!push_reg_multi_sz(ctx, &blob, wp)) {
return false;
diff --git a/source3/utils/net_printing.c b/source3/utils/net_printing.c
index 11c87bb5b4..ade399bf44 100644
--- a/source3/utils/net_printing.c
+++ b/source3/utils/net_printing.c
@@ -512,7 +512,7 @@ static NTSTATUS migrate_printer(TALLOC_CTX *mem_ctx,
continue;
}
- keyname = CONST_DISCARD(char *, r.printer_data[j].name);
+ keyname = discard_const_p(char, r.printer_data[j].name);
valuename = strchr(keyname, '\\');
if (valuename == NULL) {
continue;
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 73f41a7fe6..72d4c053e0 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -313,13 +313,13 @@ int get_pam_winbind_config()
opt_pam_winbind_conf = PAM_WINBIND_CONFIG_FILE;
}
- d = iniparser_load(CONST_DISCARD(char *, opt_pam_winbind_conf));
+ d = iniparser_load(discard_const_p(char, opt_pam_winbind_conf));
if (!d) {
return 0;
}
- if (iniparser_getboolean(d, CONST_DISCARD(char *, "global:krb5_auth"), false)) {
+ if (iniparser_getboolean(d, discard_const_p(char, "global:krb5_auth"), false)) {
ctrl |= WINBIND_KRB5_AUTH;
}
@@ -1722,7 +1722,7 @@ static void manage_client_ntlmssp_targ(struct spnego_data spnego)
spnego.type = SPNEGO_NEG_TOKEN_TARG;
spnego.negTokenTarg.negResult = SPNEGO_ACCEPT_INCOMPLETE;
- spnego.negTokenTarg.supportedMech = (char *)OID_NTLMSSP;
+ spnego.negTokenTarg.supportedMech = (const char *)OID_NTLMSSP;
spnego.negTokenTarg.responseToken = request;
spnego.negTokenTarg.mechListMIC = null_blob;
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index ea1b681588..0c14985bad 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -63,7 +63,7 @@ static bool send_message(struct messaging_context *msg_ctx,
if (procid_to_pid(&pid) != 0)
return NT_STATUS_IS_OK(
messaging_send_buf(msg_ctx, pid, msg_type,
- (uint8 *)buf, len));
+ (const uint8 *)buf, len));
ret = message_send_all(msg_ctx, msg_type, buf, len, &n_sent);
DEBUG(10,("smbcontrol/send_message: broadcast message to "
@@ -748,7 +748,7 @@ static bool do_printnotify(struct messaging_context *msg_ctx,
notify_printer_byname(messaging_event_context(msg_ctx),
msg_ctx, argv[2], attribute,
- CONST_DISCARD(char *, argv[4]));
+ discard_const_p(char, argv[4]));
goto send;
}
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index c1ff16bd04..d60a13fd69 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -670,7 +670,7 @@ int main(int argc, const char **argv)
if (smb_encrypt) {
SMBCCTX *smb_ctx = smbc_set_context(NULL);
smbc_option_set(smb_ctx,
- CONST_DISCARD(char *, "smb_encrypt_level"),
+ discard_const_p(char, "smb_encrypt_level"),
"require");
}