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

Unified Diff: nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 9 months 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
« no previous file with comments | « nss/lib/libpkix/include/pkix_revchecker.h ('k') | nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c
diff --git a/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c b/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c
index d1499a7dc5f42d2b41bca4eb325180ce0e531aba..ebe37739fa5a6cac2dd97119b45ddbce6de30deb 100755
--- a/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c
+++ b/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c
@@ -137,7 +137,7 @@ pkix_RevocationChecker_RegisterSelf(void *plContext)
PKIX_RETURN(REVOCATIONCHECKER);
}
-/* Sort methods by theirs priorities */
+/* Sort methods by their priorities (lower priority = higher preference) */
static PKIX_Error *
pkix_RevocationChecker_SortComparator(
PKIX_PL_Object *obj1,
@@ -152,7 +152,13 @@ pkix_RevocationChecker_SortComparator(
method1 = (pkix_RevocationMethod *)obj1;
method2 = (pkix_RevocationMethod *)obj2;
- *pResult = (method1->priority > method2->priority);
+ if (method1->priority < method2->priority) {
+ *pResult = -1;
+ } else if (method1->priority > method2->priority) {
+ *pResult = 1;
+ } else {
+ *pResult = 0;
+ }
PKIX_RETURN(BUILD);
}
« no previous file with comments | « nss/lib/libpkix/include/pkix_revchecker.h ('k') | nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698