summaryrefslogtreecommitdiff
path: root/indra/llcommon/llapr.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-04-16 14:51:15 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-04-16 14:51:15 -0700
commit663d8f7870c2858956aea8ab20129fd084a96dc8 (patch)
tree5ea7eaf40a018fbabaee165cc511998c5390f181 /indra/llcommon/llapr.cpp
parentba057d34cdc8fb91093aadaaad22618b6371cd0f (diff)
parent8cb7af4f73c0a703b5842a708e94d80aea26b6db (diff)
Merge
Diffstat (limited to 'indra/llcommon/llapr.cpp')
-rw-r--r--indra/llcommon/llapr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index ed70b1d9f2..7330b00bcf 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -543,14 +543,13 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb
return 0;
}
- S32 off;
- if (offset < 0)
- off = LLAPRFile::seek(file_handle, APR_END, 0);
- else
- off = LLAPRFile::seek(file_handle, APR_SET, offset);
+ llassert(offset >= 0);
+
+ if (offset > 0)
+ offset = LLAPRFile::seek(file_handle, APR_SET, offset);
apr_size_t bytes_read;
- if (off < 0)
+ if (offset < 0)
{
bytes_read = 0;
}