summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/filename_util.c4
-rw-r--r--source3/lib/util_str.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c
index aad8a08e2b..d24660c981 100644
--- a/source3/lib/filename_util.c
+++ b/source3/lib/filename_util.c
@@ -60,8 +60,8 @@ NTSTATUS create_synthetic_smb_fname(TALLOC_CTX *ctx, const char *base_name,
ZERO_STRUCT(smb_fname_loc);
/* Setup the base_name/stream_name. */
- smb_fname_loc.base_name = CONST_DISCARD(char *, base_name);
- smb_fname_loc.stream_name = CONST_DISCARD(char *, stream_name);
+ smb_fname_loc.base_name = discard_const_p(char, base_name);
+ smb_fname_loc.stream_name = discard_const_p(char, stream_name);
/* Copy the psbuf if one was given. */
if (psbuf)
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 583eea40d9..3dc73d9b8e 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -387,7 +387,7 @@ static bool string_init(char **dest,const char *src)
l = strlen(src);
if (l == 0) {
- *dest = CONST_DISCARD(char*, null_string);
+ *dest = discard_const_p(char, null_string);
} else {
(*dest) = SMB_STRDUP(src);
if ((*dest) == NULL) {
@@ -684,7 +684,7 @@ char *strnrchr_m(const char *s, char c, unsigned int n)
/* Too hard to try and get right. */
return NULL;
}
- ret = (char *)(s+strlen(s2));
+ ret = discard_const_p(char, (s+strlen(s2)));
TALLOC_FREE(ws);
TALLOC_FREE(s2);
return ret;