Use proper endian conversions.

Obtained from:	Mac OS X
MFC after:	1 week
This commit is contained in:
Boris Popov 2001-08-21 08:21:03 +00:00
parent 31201790ba
commit 618d5e9216
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82037
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ enum smb_dialects {
*/
#define SMB_SIGNATURE "\xFFSMB"
#define SMB_SIGLEN 4
#define SMB_HDRMID(p) (*(u_short*)((u_char*)(p) + 30))
#define SMB_HDRMID(p) (letohs(*(u_short*)((u_char*)(p) + 30)))
#define SMB_HDRLEN 32
/*
* bits in the smb_flags field

View File

@ -238,7 +238,7 @@ smb_rq_bend(struct smb_rq *rqp)
bcnt = rqp->sr_rq.mb_count;
if (bcnt > 0xffff)
SMBERROR("byte count too large (%d)\n", bcnt);
*rqp->sr_bcount = bcnt;
*rqp->sr_bcount = htoles(bcnt);
}
int