summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-26 20:16:26 +0100
committerJeremy Allison <jra@samba.org>2014-11-25 07:25:45 +0100
commit7b537bc8c1d72842bc1d1fca79265eb77b5b4495 (patch)
tree0d811ca9997ebf6973262e5bc6eba2e44245b498 /source3
parenta1e6db573af18a3b83d08eda41e9aad7cc4ff9cc (diff)
downloadsamba-7b537bc8c1d72842bc1d1fca79265eb77b5b4495.tar.gz
s3:smbd: do casting of dm_sessid_t in steps
This makes it more explicit and avoids compiler warnings. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/dmapi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/dmapi.c b/source3/smbd/dmapi.c
index 8c93873801e..90c24bd5de5 100644
--- a/source3/smbd/dmapi.c
+++ b/source3/smbd/dmapi.c
@@ -266,18 +266,20 @@ uint32 dmapi_file_flags(const char * const path)
uint nevents;
dm_sessid_t dmapi_session;
- const void *dmapi_session_ptr;
+ dm_sessid_t *dmapi_session_ptr;
+ const void *_dmapi_session_ptr;
void *dm_handle = NULL;
size_t dm_handle_len = 0;
uint32 flags = 0;
- dmapi_session_ptr = dmapi_get_current_session();
- if (dmapi_session_ptr == NULL) {
+ _dmapi_session_ptr = dmapi_get_current_session();
+ if (_dmapi_session_ptr == NULL) {
return 0;
}
- dmapi_session = *(const dm_sessid_t *)dmapi_session_ptr;
+ dmapi_session_ptr = discard_const_p(dm_sessid_t, _dmapi_session_ptr);
+ dmapi_session = *dmapi_session_ptr;
if (dmapi_session == DM_NO_SESSION) {
return 0;
}