summaryrefslogtreecommitdiffstats
path: root/sal/rtl/cipher.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-19 11:07:02 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-19 13:51:34 +0000
commit2ee336fb556ceb1d7e1ee8017c27539da7fe543b (patch)
tree7332ba839b28f112397104596a601c3506bd5973 /sal/rtl/cipher.cxx
parentfdo#39440 rsc: reduce scope of local variables (diff)
downloadcore-2ee336fb556ceb1d7e1ee8017c27539da7fe543b.tar.gz
core-2ee336fb556ceb1d7e1ee8017c27539da7fe543b.zip
fdo#39440 sal: reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: Id5f90757571e76a2c05a4cbd37020e1f6a6b2033 Reviewed-on: https://gerrit.libreoffice.org/13544 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sal/rtl/cipher.cxx')
-rw-r--r--sal/rtl/cipher.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index 236ac2fe6c0e..ba799ec846ca 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -1194,7 +1194,7 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl (
sal_uInt8 *pBuffer, sal_Size nBufLen)
{
unsigned int *S;
- unsigned int x, y, t;
+ unsigned int t;
sal_Size k;
/* Check arguments. */
@@ -1209,8 +1209,8 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl (
for (k = 0; k < nDatLen; k++)
{
/* Update counters X and Y. */
- x = ctx->m_X;
- y = ctx->m_Y;
+ unsigned int x = ctx->m_X;
+ unsigned int y = ctx->m_Y;
x = (x + 1 ) % CIPHER_CBLOCK_ARCFOUR;
y = (y + S[x]) % CIPHER_CBLOCK_ARCFOUR;
ctx->m_X = x;