aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-03 13:46:45 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-03 13:46:45 +0000
commitec387005417c741e468f3343bff43dea62cc4b38 (patch)
tree13a49b2d01d57d8b7f106d09cefd3900f33f78e0
parentcba315654e43edf66ba53d4fe1012a47ae0d27b8 (diff)
downloadlibextractor-ec387005417c741e468f3343bff43dea62cc4b38.tar.gz
libextractor-ec387005417c741e468f3343bff43dea62cc4b38.zip
use unsigned for pos
-rw-r--r--src/main/extractor_datasource.c5
-rw-r--r--src/main/extractor_datasource.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/extractor_datasource.c b/src/main/extractor_datasource.c
index e6eaee6..0aaafcb 100644
--- a/src/main/extractor_datasource.c
+++ b/src/main/extractor_datasource.c
@@ -1012,7 +1012,7 @@ cfs_read (struct CompressedFileSource *cfs,
1012 */ 1012 */
1013static int64_t 1013static int64_t
1014cfs_seek (struct CompressedFileSource *cfs, 1014cfs_seek (struct CompressedFileSource *cfs,
1015 uint64_t position, 1015 int64_t position,
1016 int whence) 1016 int whence)
1017{ 1017{
1018 uint64_t nposition; 1018 uint64_t nposition;
@@ -1023,6 +1023,7 @@ cfs_seek (struct CompressedFileSource *cfs,
1023 case SEEK_CUR: 1023 case SEEK_CUR:
1024 if (cfs->fpos + position < 0) 1024 if (cfs->fpos + position < 0)
1025 { 1025 {
1026 /* underflow */
1026 LOG ("Invalid seek operation\n"); 1027 LOG ("Invalid seek operation\n");
1027 return -1; 1028 return -1;
1028 } 1029 }
@@ -1353,7 +1354,7 @@ EXTRACTOR_datasource_read_ (void *cls,
1353 */ 1354 */
1354int64_t 1355int64_t
1355EXTRACTOR_datasource_seek_ (void *cls, 1356EXTRACTOR_datasource_seek_ (void *cls,
1356 uint64_t pos, 1357 int64_t pos,
1357 int whence) 1358 int whence)
1358{ 1359{
1359 struct EXTRACTOR_Datasource *ds = cls; 1360 struct EXTRACTOR_Datasource *ds = cls;
diff --git a/src/main/extractor_datasource.h b/src/main/extractor_datasource.h
index de51f40..6380a2c 100644
--- a/src/main/extractor_datasource.h
+++ b/src/main/extractor_datasource.h
@@ -97,7 +97,7 @@ EXTRACTOR_datasource_read_ (void *cls,
97 */ 97 */
98int64_t 98int64_t
99EXTRACTOR_datasource_seek_ (void *cls, 99EXTRACTOR_datasource_seek_ (void *cls,
100 uint64_t pos, 100 int64_t pos,
101 int whence); 101 int whence);
102 102
103 103