summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-15 20:32:05 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-15 20:32:05 +0100
commit0bd41cbf828181ad013964c68ab12d1f00f69bfa (patch)
treeac521c6e7e70e2e36459a8bdc4ddbccbd06f52c2
parent5dda65c0303d0e3c38e4ab57c26759937af0eeb2 (diff)
parent799e014f2a16d5031d976e9662d3333d65cfc94c (diff)
merge
-rw-r--r--indra/llcommon/llapr.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index f030867ec4..7330b00bcf 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -535,11 +535,6 @@ S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset)
//static
S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool)
{
- if (offset < 0)
- {
- return 0; // do nothing, negative offsets don't make sense for reads
- }
-
//*****************************************
apr_file_t* file_handle = open(filename, pool, APR_READ|APR_BINARY);
//*****************************************
@@ -548,10 +543,10 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb
return 0;
}
+ llassert(offset >= 0);
+
if (offset > 0)
- {
offset = LLAPRFile::seek(file_handle, APR_SET, offset);
- }
apr_size_t bytes_read;
if (offset < 0)