[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23269 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23269 - Extractor/src/main |
Date: |
Fri, 17 Aug 2012 00:52:15 +0200 |
Author: grothoff
Date: 2012-08-17 00:52:15 +0200 (Fri, 17 Aug 2012)
New Revision: 23269
Modified:
Extractor/src/main/extractor_datasource.c
Log:
fixes
Modified: Extractor/src/main/extractor_datasource.c
===================================================================
--- Extractor/src/main/extractor_datasource.c 2012-08-16 22:35:47 UTC (rev
23268)
+++ Extractor/src/main/extractor_datasource.c 2012-08-16 22:52:15 UTC (rev
23269)
@@ -117,19 +117,20 @@
uint64_t fpos;
/**
- * Position within the buffer.
+ * Position within the buffer. Our absolute offset in the file
+ * is thus 'fpos + buffer_pos'.
*/
- uint64_t buffer_pos;
+ size_t buffer_pos;
/**
* Number of valid bytes in the buffer (<= buffer_size)
*/
- uint64_t buffer_bytes;
+ size_t buffer_bytes;
/**
* Allocated size of the buffer
*/
- uint64_t buffer_size;
+ size_t buffer_size;
/**
* Descriptor of the file to read data from (may be -1)
@@ -377,8 +378,8 @@
return -1;
}
if ( (NULL == bfds->buffer) ||
- ( (bfds->buffer_pos + bfds->fpos <= pos) &&
- (bfds->buffer_pos + bfds->fpos + bfds->buffer_bytes > pos) ) )
+ ( (bfds->fpos <= pos) &&
+ (bfds->fpos + bfds->buffer_bytes > pos) ) )
{
bfds->buffer_pos = pos - bfds->fpos;
return pos;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23269 - Extractor/src/main,
gnunet <=