Bugzilla bug #65416: assign values explicitly to enumeration constants.
authorwtc%netscape.com
Tue, 19 Jun 2012 05:46:51 +0000
changeset 10382 769bfbf2f6352712b6794cdd145aeed6dc9b449d
parent 10381 1dfcacd577da0aceaef4b24d2e75bcbcc060ba5e
child 10383 b62364782ee549729fba70bd166f84b57233a3a4
push idunknown
push userunknown
push dateunknown
bugs65416, 22555
Bugzilla bug #65416: assign values explicitly to enumeration constants. The same values that the compiler would assign are assigned, with only one exception (cmmfNoPKIStatus in cmmft.h). This is patch id=22555, reviewed by Nelson Bolyard.
security/nss/lib/util/hasht.h
--- a/security/nss/lib/util/hasht.h
+++ b/security/nss/lib/util/hasht.h
@@ -42,20 +42,20 @@
 typedef struct SECHashObjectStr SECHashObject;
 typedef struct HASHContextStr HASHContext;
 
 /*
  * The hash functions the security library supports
  * NOTE the order must match the definition of SECHashObjects[]!
  */
 typedef enum {
-    HASH_AlgNULL,
-    HASH_AlgMD2,
-    HASH_AlgMD5,
-    HASH_AlgSHA1,
+    HASH_AlgNULL = 0,
+    HASH_AlgMD2 = 1,
+    HASH_AlgMD5 = 2,
+    HASH_AlgSHA1 = 3,
     HASH_AlgTOTAL
 } HASH_HashType;
 
 /*
  * Number of bytes each hash algorithm produces
  */
 #define MD2_LENGTH	16
 #define MD5_LENGTH	16