diff options
author | Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr> | 2018-04-16 17:07:24 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-19 12:17:25 +0200 |
commit | 07c29038d0ffb1cb62f47c61f3611b36eaf87f7c (patch) | |
tree | a2844681db90a3356f1b7c1fad6ff30430ac3b72 /sal/rtl | |
parent | 1cb700e9417224cadcf3e90b26eccaa3e2ce1156 (diff) |
cppcheck - fix variableScope in some files
Reduced the scope of some variables in source.
Change-Id: I705e7f2587fd81015f06fb301eb8d4a270668d73
Reviewed-on: https://gerrit.libreoffice.org/53042
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/cipher.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index 62f3104be3ed..bd913c38faf1 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -1069,7 +1069,7 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl( { unsigned int K[CIPHER_CBLOCK_ARCFOUR]; unsigned int *L, *S; - unsigned int x, y, t; + unsigned int x, y; sal_Size n, k; S = &(ctx->m_S[0]); @@ -1099,7 +1099,7 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl( { y = (y + S[x] + K[x]) % CIPHER_CBLOCK_ARCFOUR; /* swap S[x] and S[y] */ - t = S[x]; + unsigned int t = S[x]; S[x] = S[y]; S[y] = t; } @@ -1117,7 +1117,6 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl( sal_uInt8 *pBuffer, sal_Size nBufLen) { unsigned int *S; - unsigned int t; sal_Size k; /* Check arguments. */ @@ -1140,7 +1139,7 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl( ctx->m_Y = y; /* Swap S[x] and S[y]. */ - t = S[x]; + unsigned int t = S[x]; S[x] = S[y]; S[y] = t; |