diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-26 20:16:26 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-11-25 07:25:45 +0100 |
commit | 7b537bc8c1d72842bc1d1fca79265eb77b5b4495 (patch) | |
tree | 0d811ca9997ebf6973262e5bc6eba2e44245b498 /source3 | |
parent | a1e6db573af18a3b83d08eda41e9aad7cc4ff9cc (diff) | |
download | samba-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.c | 10 |
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; } |