diff options
author | Jeremy Allison <jra@samba.org> | 1998-09-11 01:24:30 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-09-11 01:24:30 +0000 |
commit | 06cc91f9a631a23dcd4902d710b89e4b7584c459 (patch) | |
tree | 97a2e3e8a684905a8a0b24aa96e8c32731dcf687 /source3/smbd/predict.c | |
parent | ede44ebdf089a835ea1f3141dd00b50b7bbc54e1 (diff) | |
download | samba-06cc91f9a631a23dcd4902d710b89e4b7584c459.tar.gz samba-06cc91f9a631a23dcd4902d710b89e4b7584c459.tar.bz2 samba-06cc91f9a631a23dcd4902d710b89e4b7584c459.zip |
Added ssize_t to configure code.
Got 'religion' about using size_t and ssize_t for read/write stuff
as part of the code to expose 64 bits to the client.
This checkin does all the 'easy' stuff - such as all the read/write/lock
calls - but now comes the harder parts (open & friends) and all the
file enquiry functions.....
Jeremy.
(This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a)
Diffstat (limited to 'source3/smbd/predict.c')
-rw-r--r-- | source3/smbd/predict.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/predict.c b/source3/smbd/predict.c index 0deda0c0b6..5f015139cf 100644 --- a/source3/smbd/predict.c +++ b/source3/smbd/predict.c @@ -28,11 +28,11 @@ extern int DEBUGLEVEL; /* variables used by the read prediction module */ static int rp_fd = -1; static SMB_OFF_T rp_offset = 0; -static int rp_length = 0; -static int rp_alloced = 0; +static ssize_t rp_length = 0; +static ssize_t rp_alloced = 0; static int rp_predict_fd = -1; static SMB_OFF_T rp_predict_offset = 0; -static int rp_predict_length = 0; +static size_t rp_predict_length = 0; static int rp_timeout = 5; static time_t rp_time = 0; static char *rp_buffer = NULL; @@ -42,10 +42,10 @@ extern time_t smb_last_time; /**************************************************************************** handle read prediction on a file ****************************************************************************/ -int read_predict(int fd,SMB_OFF_T offset,char *buf,char **ptr,int num) +ssize_t read_predict(int fd,SMB_OFF_T offset,char *buf,char **ptr,size_t num) { - int ret = 0; - int possible = rp_length - (offset - rp_offset); + ssize_t ret = 0; + ssize_t possible = rp_length - (offset - rp_offset); possible = MIN(possible,num); @@ -97,7 +97,7 @@ pre-read some data ****************************************************************************/ void do_read_prediction(void) { - static int readsize = 0; + static size_t readsize = 0; if (predict_skip) return; |