Bug 188856: it is not necessary to declare 'crv' in these blocks because it NSS_3_7_BRANCH NSS_3_7_2_BETA1
authorwtc%netscape.com
Tue, 18 Feb 2003 05:27:27 +0000
branchNSS_3_7_BRANCH
changeset 4185 c8c41b1ebb960a7b9b935b65c0eb0e891e7a7a0a
parent 4181 2aff3189f3851cff1a12479489ed414691cf0b96
child 4187 c2e425b7bbbfc1fd2102d490e68a16e5139d22f0
push idunknown
push userunknown
push dateunknown
bugs188856
Bug 188856: it is not necessary to declare 'crv' in these blocks because it is already declared in the outer scope. Tag: NSS_3_7_BRANCH
security/nss/lib/softoken/pkcs11.c
--- a/security/nss/lib/softoken/pkcs11.c
+++ b/security/nss/lib/softoken/pkcs11.c
@@ -1186,17 +1186,16 @@ pk11_handlePrivateKeyObject(PK11Session 
     /* should we check the non-token RSA private keys? */
 
     if (pk11_isTrue(object,CKA_TOKEN)) {
 	PK11Slot *slot = session->slot;
 	NSSLOWKEYPrivateKey *privKey;
 	char *label;
 	SECStatus rv = SECSuccess;
 	SECItem pubKey;
-	CK_RV crv;
 
 	if (slot->keyDB == NULL) {
 	    return CKR_TOKEN_WRITE_PROTECTED;
 	}
 
 	privKey=pk11_mkPrivKey(object,key_type,&crv);
 	if (privKey == NULL) return crv;
 	label = pk11_getString(object,CKA_LABEL);
@@ -1225,18 +1224,16 @@ pk11_handlePrivateKeyObject(PK11Session 
 
 fail:
 	if (label) PORT_Free(label);
 	object->handle = pk11_mkHandle(slot,&pubKey,PK11_TOKEN_TYPE_PRIV);
 	if (pubKey.data) PORT_Free(pubKey.data);
 	nsslowkey_DestroyPrivateKey(privKey);
 	if (rv != SECSuccess) return CKR_DEVICE_ERROR;
     } else {
-	CK_RV crv;
-
 	object->objectInfo = pk11_mkPrivKey(object,key_type,&crv);
 	if (object->objectInfo == NULL) return crv;
 	object->infoFree = (PK11Free) nsslowkey_DestroyPrivateKey;
 	/* now NULL out the sensitive attributes */
 	if (pk11_isTrue(object,CKA_SENSITIVE)) {
 	    pk11_nullAttribute(object,CKA_PRIVATE_EXPONENT);
 	    pk11_nullAttribute(object,CKA_PRIME_1);
 	    pk11_nullAttribute(object,CKA_PRIME_2);