summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-22 21:45:13 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-23 18:10:45 +0200
commit9f6927e882b8e4f207ec632f0802a6136a165d88 (patch)
tree8ad0893610436f521b1b20df8cd7500975eba484 /writerperfect
parent50b17f70c4f780d0a8e3f3c30f2b647ba400d504 (diff)
cid#1541186 Operands don't affect result
We probably manually silenced this in the past, so now it has returned after the code has changed enough to trigger it. I don't think we need to check for LONG_MAX in this case, we only return 0 or -1 here anyway. Change-Id: Ic2ba171a8c7c3f74d98088434a85e947fcadf7b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index fa5984dc842e..2bcef2b52824 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -453,19 +453,20 @@ int WPXSvInputStream::seek(tools::Long offset)
return -1;
const sal_Int64 tmpPosition = mxSeekable->getPosition();
- if ((tmpPosition < 0) || (tmpPosition > LONG_MAX))
+ if (tmpPosition < 0)
return -1;
try
{
mxSeekable->seek(offset);
- return 0;
}
catch (...)
{
SAL_WARN("writerperfect", "mxSeekable->seek(offset) threw exception");
return -1;
}
+
+ return 0;
}
bool WPXSvInputStream::isStructured()