summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-07-26 08:37:43 +0200
committerStefan Metzmacher <metze@samba.org>2012-07-26 10:02:07 +0200
commitf6592c427dbcc347ec7752c8182029a3ba937fbd (patch)
tree086f7ed23c68ac27d4e8e09518a8989cce3cf404
parent8cb6557d22fef2570156f56a8bad00cac6b7e016 (diff)
downloadsamba-f6592c427dbcc347ec7752c8182029a3ba937fbd.tar.gz
samba-f6592c427dbcc347ec7752c8182029a3ba937fbd.tar.bz2
samba-f6592c427dbcc347ec7752c8182029a3ba937fbd.zip
s3:smbd: fix compiler warnings in notify_internal.c
metze
-rw-r--r--source3/smbd/notify_internal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 49d1b06fbf..938c57b574 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -560,6 +560,7 @@ static bool notify_pull_remote_blob(TALLOC_CTX *mem_ctx,
struct notify_remote_event *ev;
enum ndr_err_code ndr_err;
DATA_BLOB data;
+ char *p;
data.data = discard_const_p(uint8_t, blob);
data.length = blob_len;
@@ -581,7 +582,8 @@ static bool notify_pull_remote_blob(TALLOC_CTX *mem_ctx,
}
*paction = ev->action;
*pfilter = ev->filter;
- *path = talloc_move(mem_ctx, (char **)&ev->path);
+ p = discard_const_p(char, ev->path);
+ *path = talloc_move(mem_ctx, &p);
TALLOC_FREE(ev);
return true;
@@ -621,7 +623,7 @@ void notify_trigger(struct notify_context *notify,
dbwrap_parse_record(
notify->db_index,
- make_tdb_data((uint8_t *)path, path_len),
+ make_tdb_data(discard_const_p(uint8_t, path), path_len),
notify_trigger_index_parser, &idx_state);
if (!idx_state.found_my_vnn) {
@@ -692,7 +694,7 @@ static void notify_trigger_local(struct notify_context *notify,
status = dbwrap_fetch(
notify->db_notify, talloc_tos(),
- make_tdb_data((uint8_t *)path, path_len), &data);
+ make_tdb_data(discard_const_p(uint8_t, path), path_len), &data);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("dbwrap_fetch returned %s\n",
nt_errstr(status)));