summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-10 10:27:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-10 21:46:37 +0000
commit6e44e13a983f7328787dffe2d8529dd2681f5c43 (patch)
treee3a1893eaf7f7285f8a97b4eebae3adff8abea80 /xmlsecurity
parent2877b291b04b8ffa0071c55c8af7a8113f7825b2 (diff)
cppcheck: variableScope
Change-Id: Ibdea832c607494d5d6b36b3655a0af7de540d0c7
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index b59e9a087ad5..8a14ed4727c1 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -299,22 +299,17 @@ SECKEYPrivateKey* SecurityEnvironment_NssImpl :: getPriKey( unsigned int positio
void SecurityEnvironment_NssImpl::updateSlots()
{
//In case new tokens are present then we can obtain the corresponding slot
- PK11SlotList * soltList = NULL;
- PK11SlotListElement * soltEle = NULL;
- PK11SlotInfo * pSlot = NULL;
- PK11SymKey * pSymKey = NULL;
-
osl::MutexGuard guard(m_mutex);
m_Slots.clear();
m_tSymKeyList.clear();
- soltList = PK11_GetAllTokens( CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, NULL ) ;
+ PK11SlotList * soltList = PK11_GetAllTokens( CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, NULL ) ;
if( soltList != NULL )
{
- for( soltEle = soltList->head ; soltEle != NULL; soltEle = soltEle->next )
+ for (PK11SlotListElement* soltEle = soltList->head ; soltEle != NULL; soltEle = soltEle->next)
{
- pSlot = soltEle->slot ;
+ PK11SlotInfo * pSlot = soltEle->slot ;
if(pSlot != NULL)
{
@@ -333,7 +328,7 @@ void SecurityEnvironment_NssImpl::updateSlots()
// By doing this, the encryption may fail if a smart card is being used which does not
// support this key generation.
//
- pSymKey = PK11_KeyGen( pSlot , CKM_DES3_CBC, NULL, 128, NULL ) ;
+ PK11SymKey * pSymKey = PK11_KeyGen( pSlot , CKM_DES3_CBC, NULL, 128, NULL ) ;
// if( pSymKey == NULL )
// {
// PK11_FreeSlot( pSlot ) ;
@@ -354,10 +349,8 @@ void SecurityEnvironment_NssImpl::updateSlots()
}// end of if(pSlot != NULL)
}// end of for
}// end of if( soltList != NULL )
-
}
-
Sequence< Reference < XCertificate > >
SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException , RuntimeException, std::exception )
{