summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-04-23 10:30:59 +0200
committerStefan Metzmacher <metze@samba.org>2011-04-24 09:48:49 +0200
commit9127e555ab043000adc516a9177e43812e52fd4b (patch)
tree6fc6270a2f7b0e69926a4b9de8787240cac83d57
parentfb05e82c99f0779bd44371a2bdafdd7147448dd5 (diff)
downloadsamba-9127e555ab043000adc516a9177e43812e52fd4b.tar.gz
samba-9127e555ab043000adc516a9177e43812e52fd4b.tar.bz2
samba-9127e555ab043000adc516a9177e43812e52fd4b.zip
s3:smbd/trans2: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
We rely on uint64_t for a long time now... metze
-rw-r--r--source3/smbd/trans2.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 507ae9ba93..830504c657 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3733,36 +3733,10 @@ cap_low = 0x%x, cap_high = 0x%x\n",
/* unknown_1 24 NULL bytes in pdata*/
/* the soft quotas 8 bytes (uint64_t)*/
- quotas.softlim = (uint64_t)IVAL(pdata,24);
-#ifdef LARGE_SMB_OFF_T
- quotas.softlim |= (((uint64_t)IVAL(pdata,28)) << 32);
-#else /* LARGE_SMB_OFF_T */
- if ((IVAL(pdata,28) != 0)&&
- ((quotas.softlim != 0xFFFFFFFF)||
- (IVAL(pdata,28)!=0xFFFFFFFF))) {
- /* more than 32 bits? */
- reply_nterror(
- req,
- NT_STATUS_INVALID_PARAMETER);
- return;
- }
-#endif /* LARGE_SMB_OFF_T */
+ quotas.softlim = BVAL(pdata,24);
/* the hard quotas 8 bytes (uint64_t)*/
- quotas.hardlim = (uint64_t)IVAL(pdata,32);
-#ifdef LARGE_SMB_OFF_T
- quotas.hardlim |= (((uint64_t)IVAL(pdata,36)) << 32);
-#else /* LARGE_SMB_OFF_T */
- if ((IVAL(pdata,36) != 0)&&
- ((quotas.hardlim != 0xFFFFFFFF)||
- (IVAL(pdata,36)!=0xFFFFFFFF))) {
- /* more than 32 bits? */
- reply_nterror(
- req,
- NT_STATUS_INVALID_PARAMETER);
- return;
- }
-#endif /* LARGE_SMB_OFF_T */
+ quotas.hardlim = BVAL(pdata,32);
/* quota_flags 2 bytes **/
quotas.qflags = SVAL(pdata,40);