Index: nss/lib/softoken/sftkpwd.c |
diff --git a/nss/lib/softoken/sftkpwd.c b/nss/lib/softoken/sftkpwd.c |
index 4c9ac172bec041248329a2cca3a80bc79f0e44db..d8ce857757d65986c59bfa3d42257e914ca5074f 100644 |
--- a/nss/lib/softoken/sftkpwd.c |
+++ b/nss/lib/softoken/sftkpwd.c |
@@ -864,8 +864,6 @@ static CK_RV |
sftk_updateMacs(PLArenaPool *arena, SFTKDBHandle *handle, |
CK_OBJECT_HANDLE id, SECItem *newKey) |
{ |
- CK_RV crv = CKR_OK; |
- CK_RV crv2; |
CK_ATTRIBUTE authAttrs[] = { |
{CKA_MODULUS, NULL, 0}, |
{CKA_PUBLIC_EXPONENT, NULL, 0}, |
@@ -879,7 +877,7 @@ sftk_updateMacs(PLArenaPool *arena, SFTKDBHandle *handle, |
{CKA_NSS_OVERRIDE_EXTENSIONS, NULL, 0}, |
}; |
CK_ULONG authAttrCount = sizeof(authAttrs)/sizeof(CK_ATTRIBUTE); |
- int i, count; |
+ unsigned int i, count; |
SFTKDBHandle *keyHandle = handle; |
SDB *keyTarget = NULL; |
@@ -902,7 +900,7 @@ sftk_updateMacs(PLArenaPool *arena, SFTKDBHandle *handle, |
/* |
* STEP 1: find the MACed attributes of this object |
*/ |
- crv2 = sftkdb_GetAttributeValue(handle, id, authAttrs, authAttrCount); |
+ (void)sftkdb_GetAttributeValue(handle, id, authAttrs, authAttrCount); |
count = 0; |
/* allocate space for the attributes */ |
for (i=0; i < authAttrCount; i++) { |
@@ -912,7 +910,6 @@ sftk_updateMacs(PLArenaPool *arena, SFTKDBHandle *handle, |
count++; |
authAttrs[i].pValue = PORT_ArenaAlloc(arena,authAttrs[i].ulValueLen); |
if (authAttrs[i].pValue == NULL) { |
- crv = CKR_HOST_MEMORY; |
break; |
} |
} |
@@ -922,7 +919,7 @@ sftk_updateMacs(PLArenaPool *arena, SFTKDBHandle *handle, |
return CKR_OK; |
} |
- crv = sftkdb_GetAttributeValue(handle, id, authAttrs, authAttrCount); |
+ (void)sftkdb_GetAttributeValue(handle, id, authAttrs, authAttrCount); |
/* ignore error code, we expect some possible errors */ |
/* GetAttributeValue just verified the old macs, safe to write |
@@ -969,7 +966,7 @@ sftk_updateEncrypted(PLArenaPool *arena, SFTKDBHandle *keydb, |
{CKA_EXPONENT_2, NULL, 0}, |
{CKA_COEFFICIENT, NULL, 0} }; |
CK_ULONG privAttrCount = sizeof(privAttrs)/sizeof(CK_ATTRIBUTE); |
- int i, count; |
+ unsigned int i, count; |
/* |
* STEP 1. Read the old attributes in the clear. |
@@ -1113,7 +1110,7 @@ sftkdb_convertObjects(SFTKDBHandle *handle, CK_ATTRIBUTE *template, |
CK_ULONG idCount = SFTK_MAX_IDS; |
CK_OBJECT_HANDLE ids[SFTK_MAX_IDS]; |
CK_RV crv, crv2; |
- int i; |
+ unsigned int i; |
crv = sftkdb_FindObjectsInit(handle, template, count, &find); |
@@ -1247,7 +1244,7 @@ loser: |
PORT_ZFree(newKey.data,newKey.len); |
} |
if (result) { |
- SECITEM_FreeItem(result, PR_FALSE); |
+ SECITEM_FreeItem(result, PR_TRUE); |
} |
if (rv != SECSuccess) { |
(*keydb->db->sdb_Abort)(keydb->db); |