From 4b51894d248fd20236122b99a9ab9fbc5fbbfce1 Mon Sep 17 00:00:00 2001 From: "wtchang%redhat.com" Date: Mon, 15 Aug 2005 21:23:39 +0000 Subject: [PATCH] Bugzilla Bug 289530: fixed signed/unsigned comparison compiler warnings. Fixed compilation errors of new ECC code added in the previous checkin. r=nelsonb. git-svn-id: svn://10.0.0.236/trunk@177781 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/softoken/pkcs11u.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mozilla/security/nss/lib/softoken/pkcs11u.c b/mozilla/security/nss/lib/softoken/pkcs11u.c index 1e3825172b4..eb8f5b3e8d2 100644 --- a/mozilla/security/nss/lib/softoken/pkcs11u.c +++ b/mozilla/security/nss/lib/softoken/pkcs11u.c @@ -1268,7 +1268,7 @@ unsigned int sftk_GetLengthInBits(unsigned char *buf, unsigned int bufLen) { unsigned int size = bufLen * 8; - int i; + unsigned int i; /* Get the real length in bytes */ for (i=0; i < bufLen; i++) { unsigned char c = *buf++; @@ -2526,7 +2526,7 @@ stfk_CopyTokenAttributes(SFTKObject *destObject,SFTKTokenObject *src_to, SFTKAttribute *attribute; SFTKAttribute *newAttribute; CK_RV crv = CKR_OK; - int i; + unsigned int i; for (i=0; i < attrCount; i++) { if (!sftk_hasAttribute(destObject,attrArray[i])) { @@ -2596,9 +2596,9 @@ stfk_CopyTokenPrivateKey(SFTKObject *destObject,SFTKTokenObject *src_to) dhPrivKeyAttrsCount); break; #ifdef NSS_ENABLE_ECC - case CKK_ECC: - crv = stfk_CopyTokenAttributes(destObject, src_to, eccPrivKeyAttrs, - eccPrivKeyAttrsCount); + case CKK_EC: + crv = stfk_CopyTokenAttributes(destObject, src_to, ecPrivKeyAttrs, + ecPrivKeyAttrsCount); break; #endif default: @@ -2658,9 +2658,9 @@ stfk_CopyTokenPublicKey(SFTKObject *destObject,SFTKTokenObject *src_to) dhPubKeyAttrsCount); break; #ifdef NSS_ENABLE_ECC - case CKK_ECC: - crv = stfk_CopyTokenAttributes(destObject, src_to, eccPubKeyAttrs, - eccPubKeyAttrsCount); + case CKK_EC: + crv = stfk_CopyTokenAttributes(destObject, src_to, ecPubKeyAttrs, + ecPubKeyAttrsCount); break; #endif default: