Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1354)

Unified Diff: nss/lib/ckfw/hash.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/ckfw/hash.c
diff --git a/nss/lib/ckfw/hash.c b/nss/lib/ckfw/hash.c
index 51f53b1a94c1509db0fb57f7ac6c1a5d7d116781..7d21084bd6304834fb5d24fc8ff7e21bdb4d1708 100644
--- a/nss/lib/ckfw/hash.c
+++ b/nss/lib/ckfw/hash.c
@@ -48,9 +48,7 @@ nss_ckfw_identity_hash
const void *key
)
{
- PRUint32 i = (PRUint32)key;
- PR_ASSERT(sizeof(PLHashNumber) == sizeof(PRUint32));
- return (PLHashNumber)i;
+ return (PLHashNumber)((char *)key - (char *)NULL);
}
/*
@@ -87,9 +85,9 @@ nssCKFWHash_Create
rv->mutex = nssCKFWInstance_CreateMutex(fwInstance, arena, pError);
if (!rv->mutex) {
if( CKR_OK == *pError ) {
- (void)nss_ZFreeIf(rv);
*pError = CKR_GENERAL_ERROR;
}
+ (void)nss_ZFreeIf(rv);
return (nssCKFWHash *)NULL;
}

Powered by Google App Engine
This is Rietveld 408576698