summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/include/byteorder.h2
-rw-r--r--source4/libcli/smb2/request.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source4/include/byteorder.h b/source4/include/byteorder.h
index d0402d0dcc..941dee9e88 100644
--- a/source4/include/byteorder.h
+++ b/source4/include/byteorder.h
@@ -218,7 +218,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
#define VWV(vwv) ((vwv)*2)
/* 64 bit macros */
-#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
+#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,((uint64_t)(v))>>32))
#define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))
#endif /* _BYTEORDER_H */
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index deadd1794f..7e25de99a8 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -70,7 +70,7 @@ struct smb2_request *smb2_request_init(struct smb2_transport *transport,
SBVAL(req->out.hdr, SMB2_HDR_SEQNUM, req->seqnum);
SIVAL(req->out.hdr, SMB2_HDR_PID, 0);
SIVAL(req->out.hdr, SMB2_HDR_TID, 0);
- SBVAL(req->out.hdr, SMB2_HDR_UID, (uint64_t)0);
+ SBVAL(req->out.hdr, SMB2_HDR_UID, 0);
memset(req->out.hdr+SMB2_HDR_SIG, 0, 16);
return req;