summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-05 14:56:30 -0700
committerJeremy Allison <jra@samba.org>2011-05-06 00:57:00 +0200
commit9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a (patch)
tree90247f66882a6fd64604b7a45310364b6a9cfede
parentf85e095dd29638dcb4819f60a7239bc37e8a41ca (diff)
downloadsamba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.tar.gz
samba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.tar.bz2
samba-9eee6e2fd2fcb1dcf19541d1bdc72eb048b3ba4a.zip
More const fixes... getting near the end now.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri May 6 00:57:00 CEST 2011 on sn-devel-104
-rw-r--r--source3/client/clitar.c10
-rw-r--r--source3/utils/net_ads.c2
-rw-r--r--source3/utils/net_lookup.c2
-rw-r--r--source3/utils/net_rpc.c18
-rw-r--r--source3/utils/net_rpc_join.c2
5 files changed, 17 insertions, 17 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index efbe5ff47f..f04071f2dc 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -1291,7 +1291,7 @@ int cmd_block(void)
char *buf;
int block;
- if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
+ if (!next_token_talloc(ctx, (const char **)&cmd_ptr,&buf,NULL)) {
DEBUG(0, ("blocksize <n>\n"));
return 1;
}
@@ -1316,7 +1316,7 @@ int cmd_tarmode(void)
TALLOC_CTX *ctx = talloc_tos();
char *buf;
- while (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
+ while (next_token_talloc(ctx, (const char **)&cmd_ptr,&buf,NULL)) {
if (strequal(buf, "full"))
tar_inc=False;
else if (strequal(buf, "inc"))
@@ -1366,7 +1366,7 @@ int cmd_setmode(void)
attra[0] = attra[1] = 0;
- if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
+ if (!next_token_talloc(ctx, (const char **)&cmd_ptr,&buf,NULL)) {
DEBUG(0, ("setmode <filename> <[+|-]rsha>\n"));
return 1;
}
@@ -1379,7 +1379,7 @@ int cmd_setmode(void)
return 1;
}
- while (next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
+ while (next_token_talloc(ctx, (const char **)&cmd_ptr,&buf,NULL)) {
q=buf;
while(*q) {
@@ -1481,7 +1481,7 @@ int cmd_tar(void)
int argcl = 0;
int ret;
- if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
+ if (!next_token_talloc(ctx, (const char **)&cmd_ptr,&buf,NULL)) {
DEBUG(0,("tar <c|x>[IXbgan] <filename>\n"));
return 1;
}
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index a966e5dd63..f753095322 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2082,7 +2082,7 @@ static int net_ads_password(struct net_context *c, int argc, const char **argv)
}
if (argv[1]) {
- new_password = (char *)argv[1];
+ new_password = (const char *)argv[1];
} else {
if (asprintf(&prompt, _("Enter new password for %s:"), user) == -1) {
return -1;
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 06aedbd473..7179d01fe3 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -290,7 +290,7 @@ static int net_lookup_kdc(struct net_context *c, int argc, const char **argv)
}
if (argc>0) {
- realm.data = CONST_DISCARD(char *, argv[0]);
+ realm.data = discard_const_p(char, argv[0]);
realm.length = strlen(argv[0]);
} else if (lp_realm() && *lp_realm()) {
realm.data = lp_realm();
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 43398524ec..7072b4ef32 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -549,7 +549,7 @@ NTSTATUS rpc_info_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -1622,7 +1622,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2584,7 +2584,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2710,7 +2710,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, &global_sid_Builtin),
+ discard_const_p(struct dom_sid2, &global_sid_Builtin),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -3032,7 +3032,7 @@ static NTSTATUS rpc_group_members_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -4318,7 +4318,7 @@ static NTSTATUS rpc_fetch_domain_aliases(struct rpc_pipe_client *pipe_hnd,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -5803,7 +5803,7 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -5977,7 +5977,7 @@ static NTSTATUS rpc_trustdom_del_internals(struct net_context *c,
status = dcerpc_samr_OpenDomain(b, mem_ctx,
&connect_pol,
MAXIMUM_ALLOWED_ACCESS,
- CONST_DISCARD(struct dom_sid2 *, domain_sid),
+ discard_const_p(struct dom_sid2, domain_sid),
&domain_pol,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -6937,7 +6937,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
for (i = 0; i < num_domains; i++) {
- char *str = CONST_DISCARD(char *, trusts->entries[i].name.string);
+ char *str = discard_const_p(char, trusts->entries[i].name.string);
found_domain = true;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 1ca213d155..7cdcc9ea74 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -498,7 +498,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
/* Now store the secret in the secrets database */
- strupper_m(CONST_DISCARD(char *, domain));
+ strupper_m(discard_const_p(char, domain));
if (!secrets_store_domain_sid(domain, domain_sid)) {
DEBUG(0, ("error storing domain sid for %s\n", domain));