Bug 1397990 - Run clang-format 4.0, r=me NSS_TLS13_DRAFT19_BRANCH
authorMartin Thomson <martin.thomson@gmail.com>
Fri, 08 Sep 2017 10:26:21 +1000
branchNSS_TLS13_DRAFT19_BRANCH
changeset 13606 9f0d109d125bb1302c37a4d0f77c6499f3ffbb54
parent 13605 7b73101f31b7d8f89061df28034f5942464bebae
child 13607 3ace64039e117f508f6f2951f269b5abc6d80509
push id2387
push usermartin.thomson@gmail.com
push dateMon, 25 Sep 2017 01:09:40 +0000
reviewersme
bugs1397990
Bug 1397990 - Run clang-format 4.0, r=me These files were being reformatted by clang-format 4.0. If you make this change, then both 3.9 (in CI) and 4.0 are happy with the result. I don't plan to do this often, but it is a huge help. Note that the PK11 ECDSA tests are an odd duck, I have more on that coming.
cmd/certcgi/certcgi.c
cmd/certutil/keystuff.c
cmd/crlutil/crlgen.c
cmd/fipstest/fipstest.c
cmd/libpkix/pkix/util/test_list2.c
cmd/modutil/install-ds.c
cmd/multinit/multinit.c
cmd/pk11mode/pk11mode.c
cmd/rsaperf/rsaperf.c
cmd/signtool/javascript.c
cmd/signtool/signtool.c
cmd/smimetools/cmsutil.c
cmd/ssltap/ssltap.c
gtests/pk11_gtest/pk11_ecdsa_unittest.cc
gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
gtests/ssl_gtest/ssl_drop_unittest.cc
lib/certdb/alg1485.c
lib/certdb/crl.c
lib/ckfw/capi/cfind.c
lib/cryptohi/seckey.c
lib/dbm/src/hash.c
lib/pk11wrap/pk11load.c
lib/pk11wrap/pk11pars.c
lib/pk11wrap/pk11pk12.c
lib/pkcs12/p12local.c
lib/smime/cmsdecode.c
lib/smime/cmsencode.c
lib/softoken/pkcs11c.c
lib/util/quickder.c
lib/util/secasn1d.c
--- a/cmd/certcgi/certcgi.c
+++ b/cmd/certcgi/certcgi.c
@@ -228,18 +228,17 @@ make_datastruct(char *data, int len)
     datastruct = current = (Pair *)PORT_Alloc(fields * sizeof(Pair));
     if (datastruct == NULL) {
         error_allocate();
     }
     while (curr_pos - data < len) {
         if (remaining == 1) {
             remaining += fields;
             fields = fields * 2;
-            datastruct = (Pair *)PORT_Realloc(datastruct, fields *
-                                                              sizeof(Pair));
+            datastruct = (Pair *)PORT_Realloc(datastruct, fields * sizeof(Pair));
             if (datastruct == NULL) {
                 error_allocate();
             }
             current = datastruct + (fields - remaining);
         }
         *current = make_pair(curr_pos);
         while (*curr_pos != '&') {
             ++curr_pos;
--- a/cmd/certutil/keystuff.c
+++ b/cmd/certutil/keystuff.c
@@ -575,18 +575,17 @@ CERTUTIL_GeneratePrivateKey(KeyType keyt
         default:
             return NULL;
     }
 
     fprintf(stderr, "\n\n");
     fprintf(stderr, "Generating key.  This may take a few moments...\n\n");
 
     privKey = PK11_GenerateKeyPairWithOpFlags(slot, mechanism, params, pubkeyp,
-                                              attrFlags, opFlagsOn, opFlagsOn |
-                                                                        opFlagsOff,
+                                              attrFlags, opFlagsOn, opFlagsOn | opFlagsOff,
                                               pwdata /*wincx*/);
     /* free up the params */
     switch (keytype) {
         case dsaKey:
             if (dsaparams)
                 CERTUTIL_DestroyParamsPQG(dsaparams);
             break;
 #ifndef NSS_DISABLE_ECC
--- a/cmd/crlutil/crlgen.c
+++ b/cmd/crlutil/crlgen.c
@@ -611,18 +611,17 @@ crlgen_CreateInvalidityDate(PLArenaPool 
     length = PORT_Strlen(dataArr[2]);
 
     encodedItem->type = siGeneralizedTime;
     encodedItem->data = PORT_ArenaAlloc(arena, length);
     if (!encodedItem->data) {
         goto loser;
     }
 
-    PORT_Memcpy(encodedItem->data, dataArr[2], (encodedItem->len = length) *
-                                                   sizeof(char));
+    PORT_Memcpy(encodedItem->data, dataArr[2], (encodedItem->len = length) * sizeof(char));
 
     *extCode = SEC_OID_X509_INVALID_DATE;
     return encodedItem;
 
 loser:
     if (mark) {
         PORT_ArenaRelease(arena, mark);
     }
--- a/cmd/fipstest/fipstest.c
+++ b/cmd/fipstest/fipstest.c
@@ -5921,18 +5921,17 @@ tls(char *reqfn)
             crv = NSC_CreateObject(session, create_template,
                                    create_template_count, &pms_handle);
             if (crv != CKR_OK) {
                 fprintf(stderr, "NSC_CreateObject failed crv=0x%x\n",
                         (unsigned int)crv);
                 goto loser;
             }
             crv = NSC_DeriveKey(session, &master_mech, pms_handle,
-                                derive_template, derive_template_count -
-                                                     1,
+                                derive_template, derive_template_count - 1,
                                 &master_handle);
             if (crv != CKR_OK) {
                 fprintf(stderr, "NSC_DeriveKey(master) failed crv=0x%x\n",
                         (unsigned int)crv);
                 goto loser;
             }
             crv = NSC_GetAttributeValue(session, master_handle,
                                         &master_template, 1);
--- a/cmd/libpkix/pkix/util/test_list2.c
+++ b/cmd/libpkix/pkix/util/test_list2.c
@@ -73,26 +73,24 @@ test_list2(int argc, char *argv[])
     }
     PKIX_TEST_DECREF_BC(testString);
 
     subTest("Performing Bubble Sort");
 
     for (i = 0; i < size; i++)
         for (j = 9; j > i; j--) {
             PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(list, j, &obj, plContext));
-            PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(list, j -
-                                                                  1,
+            PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_GetItem(list, j - 1,
                                                         &obj2, plContext));
 
             PKIX_TEST_EXPECT_NO_ERROR(PKIX_PL_Object_Compare(obj, obj2, &cmpResult, plContext));
             if (cmpResult < 0) {
                 /* Exchange the items */
                 PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_SetItem(list, j, obj2, plContext));
-                PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_SetItem(list, j -
-                                                                      1,
+                PKIX_TEST_EXPECT_NO_ERROR(PKIX_List_SetItem(list, j - 1,
                                                             obj, plContext));
             }
             /* DecRef objects */
             PKIX_TEST_DECREF_BC(obj);
             PKIX_TEST_DECREF_BC(obj2);
         }
 
     subTest("Outputting Sorted List");
--- a/cmd/modutil/install-ds.c
+++ b/cmd/modutil/install-ds.c
@@ -970,18 +970,17 @@ Pk11Install_Platform_Print(Pk11Install_P
     PAD(pad);
     if (_this->usesEquiv) {
         printf("Uses equiv, which points to:\n");
         Pk11Install_Platform_Print(_this->equiv, pad + PADINC);
     } else {
         printf("Doesn't use equiv\n");
     }
     PAD(pad);
-    printf("Module File: %s\n", _this->moduleFile ? _this->moduleFile
-                                                  : "<NULL>");
+    printf("Module File: %s\n", _this->moduleFile ? _this->moduleFile : "<NULL>");
     PAD(pad);
     printf("mechFlags: %lx\n", _this->mechFlags);
     PAD(pad);
     printf("cipherFlags: %lx\n", _this->cipherFlags);
     PAD(pad);
     printf("Files:\n");
     for (i = 0; i < _this->numFiles; i++) {
         Pk11Install_File_Print(&_this->files[i], pad + PADINC);
--- a/cmd/multinit/multinit.c
+++ b/cmd/multinit/multinit.c
@@ -497,18 +497,17 @@ do_list_certs(const char *progName, int 
 
     for (node = CERT_LIST_HEAD(sorted); !CERT_LIST_END(node, sorted);
          node = CERT_LIST_NEXT(node)) {
         CERTCertificate *cert = node->cert;
         char *commonName;
 
         SECU_PrintCertNickname(node, stderr);
         if (log) {
-            fprintf(stderr, "*	Slot=%s*\n", cert->slot ? PK11_GetTokenName(cert->slot)
-                                                        : "none");
+            fprintf(stderr, "*	Slot=%s*\n", cert->slot ? PK11_GetTokenName(cert->slot) : "none");
             fprintf(stderr, "*	Nickname=%s*\n", cert->nickname);
             fprintf(stderr, "*	Subject=<%s>*\n", cert->subjectName);
             fprintf(stderr, "*	Issuer=<%s>*\n", cert->issuerName);
             fprintf(stderr, "*	SN=");
             for (i = 0; i < cert->serialNumber.len; i++) {
                 if (i != 0)
                     fprintf(stderr, ":");
                 fprintf(stderr, "%02x", cert->serialNumber.data[0]);
--- a/cmd/pk11mode/pk11mode.c
+++ b/cmd/pk11mode/pk11mode.c
@@ -2164,46 +2164,32 @@ PKM_Mechanism(CK_FUNCTION_LIST_PTR pFunc
         if (!mechName)
             mechName = "Unknown mechanism";
         PKM_LogIt("    [%lu]: CK_MECHANISM_TYPE = %s 0x%08lX\n", (i + 1),
                   mechName,
                   pMechanismList[i]);
         PKM_LogIt("    ulMinKeySize = %lu\n", minfo.ulMinKeySize);
         PKM_LogIt("    ulMaxKeySize = %lu\n", minfo.ulMaxKeySize);
         PKM_LogIt("    flags = 0x%08x\n", minfo.flags);
-        PKM_LogIt("        -> HW = %s\n", minfo.flags & CKF_HW ? "TRUE"
-                                                               : "FALSE");
-        PKM_LogIt("        -> ENCRYPT = %s\n", minfo.flags & CKF_ENCRYPT ? "TRUE"
-                                                                         : "FALSE");
-        PKM_LogIt("        -> DECRYPT = %s\n", minfo.flags & CKF_DECRYPT ? "TRUE"
-                                                                         : "FALSE");
-        PKM_LogIt("        -> DIGEST = %s\n", minfo.flags & CKF_DIGEST ? "TRUE"
-                                                                       : "FALSE");
-        PKM_LogIt("        -> SIGN = %s\n", minfo.flags & CKF_SIGN ? "TRUE"
-                                                                   : "FALSE");
-        PKM_LogIt("        -> SIGN_RECOVER = %s\n", minfo.flags &
-                                                            CKF_SIGN_RECOVER
-                                                        ? "TRUE"
-                                                        : "FALSE");
-        PKM_LogIt("        -> VERIFY = %s\n", minfo.flags & CKF_VERIFY ? "TRUE"
-                                                                       : "FALSE");
+        PKM_LogIt("        -> HW = %s\n", minfo.flags & CKF_HW ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> ENCRYPT = %s\n", minfo.flags & CKF_ENCRYPT ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> DECRYPT = %s\n", minfo.flags & CKF_DECRYPT ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> DIGEST = %s\n", minfo.flags & CKF_DIGEST ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> SIGN = %s\n", minfo.flags & CKF_SIGN ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> SIGN_RECOVER = %s\n", minfo.flags & CKF_SIGN_RECOVER ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> VERIFY = %s\n", minfo.flags & CKF_VERIFY ? "TRUE" : "FALSE");
         PKM_LogIt("        -> VERIFY_RECOVER = %s\n",
                   minfo.flags & CKF_VERIFY_RECOVER ? "TRUE" : "FALSE");
-        PKM_LogIt("        -> GENERATE = %s\n", minfo.flags & CKF_GENERATE ? "TRUE"
-                                                                           : "FALSE");
+        PKM_LogIt("        -> GENERATE = %s\n", minfo.flags & CKF_GENERATE ? "TRUE" : "FALSE");
         PKM_LogIt("        -> GENERATE_KEY_PAIR = %s\n",
                   minfo.flags & CKF_GENERATE_KEY_PAIR ? "TRUE" : "FALSE");
-        PKM_LogIt("        -> WRAP = %s\n", minfo.flags & CKF_WRAP ? "TRUE"
-                                                                   : "FALSE");
-        PKM_LogIt("        -> UNWRAP = %s\n", minfo.flags & CKF_UNWRAP ? "TRUE"
-                                                                       : "FALSE");
-        PKM_LogIt("        -> DERIVE = %s\n", minfo.flags & CKF_DERIVE ? "TRUE"
-                                                                       : "FALSE");
-        PKM_LogIt("        -> EXTENSION = %s\n", minfo.flags & CKF_EXTENSION ? "TRUE"
-                                                                             : "FALSE");
+        PKM_LogIt("        -> WRAP = %s\n", minfo.flags & CKF_WRAP ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> UNWRAP = %s\n", minfo.flags & CKF_UNWRAP ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> DERIVE = %s\n", minfo.flags & CKF_DERIVE ? "TRUE" : "FALSE");
+        PKM_LogIt("        -> EXTENSION = %s\n", minfo.flags & CKF_EXTENSION ? "TRUE" : "FALSE");
 
         PKM_LogIt("\n");
     }
 
     return crv;
 }
 
 CK_RV
@@ -3599,34 +3585,22 @@ PKM_FindAllObjects(CK_FUNCTION_LIST_PTR 
         return crv;
     }
 
     PKM_LogIt("    SESSION INFO:\n");
     PKM_LogIt("        slotID = %lu\n", sinfo.slotID);
     PKM_LogIt("        state = %lu\n", sinfo.state);
     PKM_LogIt("        flags = 0x%08x\n", sinfo.flags);
 #ifdef CKF_EXCLUSIVE_SESSION
-    PKM_LogIt("            -> EXCLUSIVE SESSION = %s\n", sinfo.flags &
-                                                                 CKF_EXCLUSIVE_SESSION
-                                                             ? "TRUE"
-                                                             : "FALSE");
+    PKM_LogIt("            -> EXCLUSIVE SESSION = %s\n", sinfo.flags & CKF_EXCLUSIVE_SESSION ? "TRUE" : "FALSE");
 #endif /* CKF_EXCLUSIVE_SESSION */
-    PKM_LogIt("            -> RW SESSION = %s\n", sinfo.flags &
-                                                          CKF_RW_SESSION
-                                                      ? "TRUE"
-                                                      : "FALSE");
-    PKM_LogIt("            -> SERIAL SESSION = %s\n", sinfo.flags &
-                                                              CKF_SERIAL_SESSION
-                                                          ? "TRUE"
-                                                          : "FALSE");
+    PKM_LogIt("            -> RW SESSION = %s\n", sinfo.flags & CKF_RW_SESSION ? "TRUE" : "FALSE");
+    PKM_LogIt("            -> SERIAL SESSION = %s\n", sinfo.flags & CKF_SERIAL_SESSION ? "TRUE" : "FALSE");
 #ifdef CKF_INSERTION_CALLBACK
-    PKM_LogIt("            -> INSERTION CALLBACK = %s\n", sinfo.flags &
-                                                                  CKF_INSERTION_CALLBACK
-                                                              ? "TRUE"
-                                                              : "FALSE");
+    PKM_LogIt("            -> INSERTION CALLBACK = %s\n", sinfo.flags & CKF_INSERTION_CALLBACK ? "TRUE" : "FALSE");
 #endif /* CKF_INSERTION_CALLBACK */
     PKM_LogIt("        ulDeviceError = %lu\n", sinfo.ulDeviceError);
     PKM_LogIt("\n");
 
     crv = pFunctionList->C_FindObjectsInit(h, NULL, 0);
     if (CKR_OK != crv) {
         PKM_LogIt("C_FindObjectsInit(%lu, NULL, 0) returned "
                   "0x%08X, %-26s\n",
--- a/cmd/rsaperf/rsaperf.c
+++ b/cmd/rsaperf/rsaperf.c
@@ -666,18 +666,17 @@ main(int argc, char **argv)
     }
     PORT_Free(runDataArr);
     PORT_Free(threadsArr);
 
     TimingEnd(timeCtx, PR_Now());
 
     printf("%ld iterations in %s\n",
            iters, TimingGenerateString(timeCtx));
-    printf("%.2f operations/s .\n", ((double)(iters) * (double)1000000.0) /
-                                        (double)timeCtx->interval);
+    printf("%.2f operations/s .\n", ((double)(iters) * (double)1000000.0) / (double)timeCtx->interval);
     TimingDivide(timeCtx, iters);
     printf("one operation every %s\n", TimingGenerateString(timeCtx));
 
     if (pubHighKey) {
         SECKEY_DestroyPublicKey(pubHighKey);
     }
 
     if (privHighKey) {
--- a/cmd/signtool/javascript.c
+++ b/cmd/signtool/javascript.c
@@ -1110,18 +1110,17 @@ extract_js(char *filename)
     }
 
     state = TEXT_HTML_STATE;
 
     fb = FB_Create(fd);
 
     textStart = 0;
     startLine = 0;
-    while (linenum = FB_GetLineNum(fb), (curchar = FB_GetChar(fb)) !=
-                                            EOF) {
+    while (linenum = FB_GetLineNum(fb), (curchar = FB_GetChar(fb)) != EOF) {
         switch (state) {
             case TEXT_HTML_STATE:
                 if (curchar == '<') {
                     /*
                      * Found a tag
                      */
                     /* Save the text so far to a new text item */
                     curOffset = FB_GetPointer(fb) - 2;
--- a/cmd/signtool/signtool.c
+++ b/cmd/signtool/signtool.c
@@ -1028,19 +1028,17 @@ main(int argc, char *argv[])
 
         if (!leaveArc) {
             RemoveAllArc(jartree);
         }
 
         if (errorCount > 0 || warningCount > 0) {
             PR_fprintf(outputFD, "%d error%s, %d warning%s.\n",
                        errorCount,
-                       errorCount == 1 ? "" : "s", warningCount, warningCount == 1
-                                                                     ? ""
-                                                                     : "s");
+                       errorCount == 1 ? "" : "s", warningCount, warningCount == 1 ? "" : "s");
         } else {
             PR_fprintf(outputFD, "Directory %s signed successfully.\n",
                        jartree);
         }
     } else if (jartree) {
         SignArchive(jartree, keyName, zipfile, javascript, metafile,
                     install_script, optimize, !noRecurse);
     } else
--- a/cmd/smimetools/cmsutil.c
+++ b/cmd/smimetools/cmsutil.c
@@ -1567,20 +1567,17 @@ main(int argc, char **argv)
             fprintf(stderr, "%s: cannot create encoder context.\n", progName);
             exit(1);
         }
         if (cms_verbose) {
             fprintf(stderr, "input len [%d]\n", input.len);
             {
                 unsigned int j;
                 for (j = 0; j < input.len; j++)
-                    fprintf(stderr, "%2x%c", input.data[j], (j > 0 &&
-                                                             j % 35 == 0)
-                                                                ? '\n'
-                                                                : ' ');
+                    fprintf(stderr, "%2x%c", input.data[j], (j > 0 && j % 35 == 0) ? '\n' : ' ');
             }
         }
         if (input.len > 0) { /* skip if certs-only (or other zero content) */
             rv = NSS_CMSEncoder_Update(ecx, (char *)input.data, input.len);
             if (rv) {
                 fprintf(stderr,
                         "%s: failed to add data to encoder.\n", progName);
                 exit(1);
--- a/cmd/ssltap/ssltap.c
+++ b/cmd/ssltap/ssltap.c
@@ -1632,18 +1632,17 @@ print_ssl3_handshake(unsigned char *reco
                                certlength, certlength);
                     certbytesread +=
                         certlength + 3;
                     if (certbytesread <=
                         certslength) {
                         PR_snprintf(certFileName, sizeof certFileName, "cert.%03d",
                                     ++certFileNumber);
                         cfd =
-                            PR_Open(certFileName, PR_WRONLY |
-                                                      PR_CREATE_FILE | PR_TRUNCATE,
+                            PR_Open(certFileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
                                     0664);
                         if (!cfd) {
                             PR_fprintf(PR_STDOUT,
                                        "               data = { couldn't save file '%s' }\n",
                                        certFileName);
                         } else {
                             PR_Write(cfd, (hsdata +
                                            pos),
@@ -1717,18 +1716,17 @@ print_ssl3_handshake(unsigned char *reco
                             PORT_Free(ca_name);
                         } else {
                             PR_fprintf(PR_STDOUT,
                                        "              distinguished name [%d]", dnLen);
                             if (dnLen >
                                     0 &&
                                 sslhexparse) {
                                 PR_fprintf(PR_STDOUT, " = {\n");
-                                print_hex(dnLen, hsdata +
-                                                     pos);
+                                print_hex(dnLen, hsdata + pos);
                                 PR_fprintf(PR_STDOUT, "              }\n");
                             } else {
                                 PR_fprintf(PR_STDOUT, "\n");
                             }
                         }
                         pos +=
                             dnLen;
                         exListLen -=
@@ -1791,18 +1789,17 @@ print_ssl3_handshake(unsigned char *reco
                 /* skip 4 bytes with handshake numbers, as in ssl3_HandleCertificateStatus */
                 data.type = siBuffer;
                 data.data = hsdata + 4;
                 data.len = sslh.length - 4;
                 print_status_response(&data);
 
                 PR_snprintf(ocspFileName, sizeof ocspFileName, "ocsp.%03d",
                             ++ocspFileNumber);
-                ofd = PR_Open(ocspFileName, PR_WRONLY |
-                                                PR_CREATE_FILE | PR_TRUNCATE,
+                ofd = PR_Open(ocspFileName, PR_WRONLY | PR_CREATE_FILE | PR_TRUNCATE,
                               0664);
                 if (!ofd) {
                     PR_fprintf(PR_STDOUT,
                                "               data = { couldn't save file '%s' }\n",
                                ocspFileName);
                 } else {
                     PR_Write(ofd, data.data, data.len);
                     PR_fprintf(PR_STDOUT,
@@ -2162,18 +2159,17 @@ print_ssl(DataBufferList *s, int length,
                                 break;
                         }
 
                         if (sslhexparse)
                             print_hex(recordLen - s->hMACsize, recordBuf);
                         break;
 
                     case 22: /* handshake */
-                        print_ssl3_handshake(recordBuf, recordLen -
-                                                            s->hMACsize,
+                        print_ssl3_handshake(recordBuf, recordLen - s->hMACsize,
                                              &sr, s);
                         break;
 
                     case 23: /* application data */
                         print_hex(recordLen -
                                       s->hMACsize,
                                   recordBuf);
                         break;
--- a/gtests/pk11_gtest/pk11_ecdsa_unittest.cc
+++ b/gtests/pk11_gtest/pk11_ecdsa_unittest.cc
@@ -31,36 +31,33 @@ class Pkcs11EcdsaSha384Test : public Pkc
   SECOidTag hashOID() { return SEC_OID_SHA384; }
 };
 
 class Pkcs11EcdsaSha512Test : public Pkcs11EcdsaTest {
  protected:
   SECOidTag hashOID() { return SEC_OID_SHA512; }
 };
 
-TEST_F(Pkcs11EcdsaSha256Test, VerifyP256) {
-  SIG_TEST_VECTOR_VERIFY(kP256Spki, kP256Data, kP256Signature)
-}
-TEST_F(Pkcs11EcdsaSha256Test, SignAndVerifyP256) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP256Pkcs8, kP256Spki, kP256Data)
-}
+TEST_F(Pkcs11EcdsaSha256Test,
+       VerifyP256){SIG_TEST_VECTOR_VERIFY(kP256Spki, kP256Data, kP256Signature)}
+
+TEST_F(Pkcs11EcdsaSha256Test, SignAndVerifyP256){
+    SIG_TEST_VECTOR_SIGN_VERIFY(kP256Pkcs8, kP256Spki, kP256Data)}
+
+TEST_F(Pkcs11EcdsaSha384Test,
+       VerifyP384){SIG_TEST_VECTOR_VERIFY(kP384Spki, kP384Data, kP384Signature)}
 
-TEST_F(Pkcs11EcdsaSha384Test, VerifyP384) {
-  SIG_TEST_VECTOR_VERIFY(kP384Spki, kP384Data, kP384Signature)
-}
-TEST_F(Pkcs11EcdsaSha384Test, SignAndVerifyP384) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP384Pkcs8, kP384Spki, kP384Data)
-}
+TEST_F(Pkcs11EcdsaSha384Test, SignAndVerifyP384){
+    SIG_TEST_VECTOR_SIGN_VERIFY(kP384Pkcs8, kP384Spki, kP384Data)}
 
-TEST_F(Pkcs11EcdsaSha512Test, VerifyP521) {
-  SIG_TEST_VECTOR_VERIFY(kP521Spki, kP521Data, kP521Signature)
-}
-TEST_F(Pkcs11EcdsaSha512Test, SignAndVerifyP521) {
-  SIG_TEST_VECTOR_SIGN_VERIFY(kP521Pkcs8, kP521Spki, kP521Data)
-}
+TEST_F(Pkcs11EcdsaSha512Test,
+       VerifyP521){SIG_TEST_VECTOR_VERIFY(kP521Spki, kP521Data, kP521Signature)}
+
+TEST_F(Pkcs11EcdsaSha512Test, SignAndVerifyP521){
+    SIG_TEST_VECTOR_SIGN_VERIFY(kP521Pkcs8, kP521Spki, kP521Data)}
 
 // Importing a private key in PKCS#8 format must fail when the outer AlgID
 // struct contains neither id-ecPublicKey nor a namedCurve parameter.
 TEST_F(Pkcs11EcdsaSha256Test, ImportNoCurveOIDOrAlgorithmParams) {
   EXPECT_FALSE(ImportPrivateKey(kP256Pkcs8NoCurveOIDOrAlgorithmParams,
                                 sizeof(kP256Pkcs8NoCurveOIDOrAlgorithmParams)));
 };
 
--- a/gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
+++ b/gtests/ssl_gtest/ssl_ciphersuite_unittest.cc
@@ -26,21 +26,21 @@ namespace nss_test {
 typedef std::tuple<SSLProtocolVariant, uint16_t, uint16_t, SSLNamedGroup,
                    SSLSignatureScheme>
     CipherSuiteProfile;
 
 class TlsCipherSuiteTestBase : public TlsConnectTestBase {
  public:
   TlsCipherSuiteTestBase(SSLProtocolVariant variant, uint16_t version,
                          uint16_t cipher_suite, SSLNamedGroup group,
-                         SSLSignatureScheme signature_scheme)
+                         SSLSignatureScheme sig_scheme)
       : TlsConnectTestBase(variant, version),
         cipher_suite_(cipher_suite),
         group_(group),
-        signature_scheme_(signature_scheme),
+        sig_scheme_(sig_scheme),
         csinfo_({0}) {
     SECStatus rv =
         SSL_GetCipherSuiteInfo(cipher_suite_, &csinfo_, sizeof(csinfo_));
     EXPECT_EQ(SECSuccess, rv);
     if (rv == SECSuccess) {
       std::cerr << "Cipher suite: " << csinfo_.cipherSuiteName << std::endl;
     }
     auth_type_ = csinfo_.authType;
@@ -55,24 +55,24 @@ class TlsCipherSuiteTestBase : public Tl
     server_->EnableSingleCipher(cipher_suite_);
 
     if (version_ >= SSL_LIBRARY_VERSION_TLS_1_3) {
       std::vector<SSLNamedGroup> groups = {group_};
       client_->ConfigNamedGroups(groups);
       server_->ConfigNamedGroups(groups);
       kea_type_ = SSLInt_GetKEAType(group_);
 
-      client_->SetSignatureSchemes(&signature_scheme_, 1);
-      server_->SetSignatureSchemes(&signature_scheme_, 1);
+      client_->SetSignatureSchemes(&sig_scheme_, 1);
+      server_->SetSignatureSchemes(&sig_scheme_, 1);
     }
   }
 
   virtual void SetupCertificate() {
     if (version_ >= SSL_LIBRARY_VERSION_TLS_1_3) {
-      switch (signature_scheme_) {
+      switch (sig_scheme_) {
         case ssl_sig_rsa_pkcs1_sha256:
         case ssl_sig_rsa_pkcs1_sha384:
         case ssl_sig_rsa_pkcs1_sha512:
           Reset(TlsAgent::kServerRsaSign);
           auth_type_ = ssl_auth_rsa_sign;
           break;
         case ssl_sig_rsa_pss_sha256:
         case ssl_sig_rsa_pss_sha384:
@@ -88,18 +88,17 @@ class TlsCipherSuiteTestBase : public Tl
           Reset(TlsAgent::kServerEcdsa256);
           auth_type_ = ssl_auth_ecdsa;
           break;
         case ssl_sig_ecdsa_secp384r1_sha384:
           Reset(TlsAgent::kServerEcdsa384);
           auth_type_ = ssl_auth_ecdsa;
           break;
         default:
-          ASSERT_TRUE(false) << "Unsupported signature scheme: "
-                             << signature_scheme_;
+          ADD_FAILURE() << "Unsupported signature scheme: " << sig_scheme_;
           break;
       }
     } else {
       switch (csinfo_.authType) {
         case ssl_auth_rsa_sign:
           Reset(TlsAgent::kServerRsaSign);
           break;
         case ssl_auth_rsa_decrypt:
@@ -182,17 +181,17 @@ class TlsCipherSuiteTestBase : public Tl
     return limit;
   }
 
  protected:
   uint16_t cipher_suite_;
   SSLAuthType auth_type_;
   SSLKEAType kea_type_;
   SSLNamedGroup group_;
-  SSLSignatureScheme signature_scheme_;
+  SSLSignatureScheme sig_scheme_;
   SSLCipherSuiteInfo csinfo_;
 };
 
 class TlsCipherSuiteTest
     : public TlsCipherSuiteTestBase,
       public ::testing::WithParamInterface<CipherSuiteProfile> {
  public:
   TlsCipherSuiteTest()
--- a/gtests/ssl_gtest/ssl_drop_unittest.cc
+++ b/gtests/ssl_gtest/ssl_drop_unittest.cc
@@ -304,19 +304,20 @@ TEST_F(TlsDropDatagram13, DropFirstHalfO
   expected_client_acks_ = 1;
   HandshakeAndAck(client_);
   server_->Handshake();                               // Retransmit
   EXPECT_EQ(3UL, server_filters_.records_->count());  // CT2, CV, FIN
   // Check that the first record is CT1 (which is identical to the same
   // as the previous CT1).
   EXPECT_EQ(ct1_size, server_filters_.record(0).buffer.len());
   CheckedHandshakeSendReceive();
-  CheckAcks(client_filters_, 0, {0,                      // SH
-                                 0x0002000000000000ULL,  // EE
-                                 0x0002000000000002ULL}  // CT2
+  CheckAcks(client_filters_, 0,
+            {0,                      // SH
+             0x0002000000000000ULL,  // EE
+             0x0002000000000002ULL}  // CT2
             );
   CheckAcks(server_filters_, 0, {0x0002000000000000ULL});
 }
 
 // Shrink the MTU down so that certs get split and drop the second piece.
 TEST_F(TlsDropDatagram13, DropSecondHalfOfServerCertificate) {
   server_filters_.drop_->Enable(8);
   StartConnect();
@@ -330,21 +331,22 @@ TEST_F(TlsDropDatagram13, DropSecondHalf
   server_filters_.records_->Clear();
   expected_client_acks_ = 1;
   HandshakeAndAck(client_);
   server_->Handshake();                               // Retransmit
   EXPECT_EQ(3UL, server_filters_.records_->count());  // CT1, CV, FIN
   // Check that the first record is CT1
   EXPECT_EQ(ct1_size, server_filters_.record(0).buffer.len());
   CheckedHandshakeSendReceive();
-  CheckAcks(client_filters_, 0, {
-                                    0,                      // SH
-                                    0x0002000000000000ULL,  // EE
-                                    0x0002000000000001ULL,  // CT1
-                                });
+  CheckAcks(client_filters_, 0,
+            {
+                0,                      // SH
+                0x0002000000000000ULL,  // EE
+                0x0002000000000001ULL,  // CT1
+            });
   CheckAcks(server_filters_, 0, {0x0002000000000000ULL});
 }
 
 TEST_F(TlsDropDatagram13, NoDropsDuringZeroRtt) {
   SetupForZeroRtt();
   SetFilters();
   std::cerr << "Starting second handshake" << std::endl;
   client_->Set0RttEnabled(true);
@@ -406,20 +408,21 @@ TEST_F(TlsDropDatagram13, ReorderServerE
   StartConnect();
   client_->Handshake();
   server_->Handshake();
   // We dropped EE, now reinject.
   server_->SendRecordDirect(server_filters_.record(1));
   expected_client_acks_ = 1;
   HandshakeAndAck(client_);
   CheckedHandshakeSendReceive();
-  CheckAcks(client_filters_, 0, {
-                                    0,                   // SH
-                                    0x0002000000000000,  // EE
-                                });
+  CheckAcks(client_filters_, 0,
+            {
+                0,                   // SH
+                0x0002000000000000,  // EE
+            });
   CheckAcks(server_filters_, 0, {0x0002000000000000ULL});
 }
 
 // The client sends an out of order non-handshake message
 // but with the handshake key.
 class TlsSendCipherSpecCapturer {
  public:
   TlsSendCipherSpecCapturer(std::shared_ptr<TlsAgent>& agent)
--- a/lib/certdb/alg1485.c
+++ b/lib/certdb/alg1485.c
@@ -1309,18 +1309,17 @@ CERT_GetCertificateEmailAddress(CERTCert
                     if (rawEmailAddr ==
                         NULL) {
                         rawEmailAddr =
                             CERT_GetNameElement(cert->arena, &(current->name.directoryName),
                                                 SEC_OID_RFC1274_MAIL);
                     }
                 } else if (current->type == certRFC822Name) {
                     rawEmailAddr =
-                        (char*)PORT_ArenaZAlloc(cert->arena, current->name.other.len +
-                                                                 1);
+                        (char*)PORT_ArenaZAlloc(cert->arena, current->name.other.len + 1);
                     if (!rawEmailAddr) {
                         goto finish;
                     }
                     PORT_Memcpy(rawEmailAddr, current->name.other.data,
                                 current->name.other.len);
                     rawEmailAddr[current->name.other.len] =
                         '\0';
                 }
--- a/lib/certdb/crl.c
+++ b/lib/certdb/crl.c
@@ -1289,18 +1289,17 @@ DPCache_AddCRL(CRLDPCache* cache, Cached
             if (SECSuccess != DPCache_RemoveCRL(cache, i)) {
                 PORT_Assert(0);
                 PORT_SetError(SEC_ERROR_LIBRARY_FAILURE);
                 return PR_FALSE;
             }
         }
     }
 
-    newcrls = (CachedCrl**)PORT_Realloc(cache->crls, (cache->ncrls + 1) *
-                                                         sizeof(CachedCrl*));
+    newcrls = (CachedCrl**)PORT_Realloc(cache->crls, (cache->ncrls + 1) * sizeof(CachedCrl*));
     if (!newcrls) {
         return SECFailure;
     }
     cache->crls = newcrls;
     cache->ncrls++;
     cache->crls[cache->ncrls - 1] = newcrl;
     *added = PR_TRUE;
     return SECSuccess;
--- a/lib/ckfw/capi/cfind.c
+++ b/lib/ckfw/capi/cfind.c
@@ -326,18 +326,17 @@ collect_class(
                 rv = CertGetCertificateContextProperty(certContext,
                                                        CERT_KEY_PROV_INFO_PROP_ID, keyProvInfo, &size);
                 if (rv) {
                     char *provName =
                         nss_ckcapi_WideToUTF8(keyProvInfo->pwszProvName);
                     nss_ZFreeIf(keyProvInfo);
 
                     if (provName &&
-                        (strncmp(provName, "Microsoft", sizeof("Microsoft") -
-                                                            1) != 0)) {
+                        (strncmp(provName, "Microsoft", sizeof("Microsoft") - 1) != 0)) {
                         continue;
                     }
                 } else {
                     int reason =
                         GetLastError();
                     /* we only care if it exists, we don't really need to fetch it yet */
                     nss_ZFreeIf(keyProvInfo);
                     if (reason ==
--- a/lib/cryptohi/seckey.c
+++ b/lib/cryptohi/seckey.c
@@ -216,27 +216,25 @@ SECKEY_CreateECPrivateKey(SECKEYECParams
         return NULL;
     }
 
     privk = PK11_GenerateKeyPairWithOpFlags(slot, CKM_EC_KEY_PAIR_GEN,
                                             param, pubk,
                                             PK11_ATTR_SESSION |
                                                 PK11_ATTR_INSENSITIVE |
                                                 PK11_ATTR_PUBLIC,
-                                            CKF_DERIVE, CKF_DERIVE |
-                                                            CKF_SIGN,
+                                            CKF_DERIVE, CKF_DERIVE | CKF_SIGN,
                                             cx);
     if (!privk)
         privk = PK11_GenerateKeyPairWithOpFlags(slot, CKM_EC_KEY_PAIR_GEN,
                                                 param, pubk,
                                                 PK11_ATTR_SESSION |
                                                     PK11_ATTR_SENSITIVE |
                                                     PK11_ATTR_PRIVATE,
-                                                CKF_DERIVE, CKF_DERIVE |
-                                                                CKF_SIGN,
+                                                CKF_DERIVE, CKF_DERIVE | CKF_SIGN,
                                                 cx);
 
     PK11_FreeSlot(slot);
     return (privk);
 }
 
 void
 SECKEY_DestroyPrivateKey(SECKEYPrivateKey *privk)
--- a/lib/dbm/src/hash.c
+++ b/lib/dbm/src/hash.c
@@ -699,18 +699,17 @@ hash_put(
         hashp->dbmerrno = errno = EINVAL;
         return (DBM_ERROR);
     }
     if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
         hashp->dbmerrno = errno = EPERM;
         return (DBM_ERROR);
     }
 
-    rv = hash_access(hashp, flag == R_NOOVERWRITE ? HASH_PUTNEW
-                                                  : HASH_PUT,
+    rv = hash_access(hashp, flag == R_NOOVERWRITE ? HASH_PUTNEW : HASH_PUT,
                      (DBT *)key, (DBT *)data);
 
     if (rv == DATABASE_CORRUPTED_ERROR) {
 #if defined(unix) && defined(DEBUG)
         printf("\n\nDBM Database has been corrupted, tell Lou...\n\n");
 #endif
         __remove_database((DB *)dbp);
     }
--- a/lib/pk11wrap/pk11load.c
+++ b/lib/pk11wrap/pk11load.c
@@ -59,18 +59,17 @@ secmodUnlockMutext(CK_VOID_PTR mutext)
 {
     PZ_Unlock((PZLock *)mutext);
     return CKR_OK;
 }
 
 static SECMODModuleID nextModuleID = 1;
 static const CK_C_INITIALIZE_ARGS secmodLockFunctions = {
     secmodCreateMutext, secmodDestroyMutext, secmodLockMutext,
-    secmodUnlockMutext, CKF_LIBRARY_CANT_CREATE_OS_THREADS |
-                            CKF_OS_LOCKING_OK,
+    secmodUnlockMutext, CKF_LIBRARY_CANT_CREATE_OS_THREADS | CKF_OS_LOCKING_OK,
     NULL
 };
 static const CK_C_INITIALIZE_ARGS secmodNoLockArgs = {
     NULL, NULL, NULL, NULL,
     CKF_LIBRARY_CANT_CREATE_OS_THREADS, NULL
 };
 
 static PRBool loadSingleThreadedModules = PR_TRUE;
--- a/lib/pk11wrap/pk11pars.c
+++ b/lib/pk11wrap/pk11pars.c
@@ -408,18 +408,17 @@ static const policyFlagDef policyFlagLis
     { CIPHER_NAME("SSL"), NSS_USE_ALG_IN_SSL },
     { CIPHER_NAME("SSL-KEY-EXCHANGE"), NSS_USE_ALG_IN_SSL_KX },
     /* add other key exhanges in the future */
     { CIPHER_NAME("KEY-EXCHANGE"), NSS_USE_ALG_IN_SSL_KX },
     { CIPHER_NAME("CERT-SIGNATURE"), NSS_USE_ALG_IN_CERT_SIGNATURE },
     /* add other signatures in the future */
     { CIPHER_NAME("SIGNATURE"), NSS_USE_ALG_IN_CERT_SIGNATURE },
     /* enable everything */
-    { CIPHER_NAME("ALL"), NSS_USE_ALG_IN_SSL | NSS_USE_ALG_IN_SSL_KX |
-                              NSS_USE_ALG_IN_CERT_SIGNATURE },
+    { CIPHER_NAME("ALL"), NSS_USE_ALG_IN_SSL | NSS_USE_ALG_IN_SSL_KX | NSS_USE_ALG_IN_CERT_SIGNATURE },
     { CIPHER_NAME("NONE"), 0 }
 };
 
 /*
  *  Get the next cipher on the list. point to the next one in 'next'.
  *  return the length;
  */
 static const char *
--- a/lib/pk11wrap/pk11pk12.c
+++ b/lib/pk11wrap/pk11pk12.c
@@ -341,26 +341,23 @@ PK11_ImportAndReturnPrivateKey(PK11SlotI
     attrs++;
     PK11_SETATTRS(attrs, CKA_PRIVATE, isPrivate ? &cktrue : &ckfalse,
                   sizeof(CK_BBOOL));
     attrs++;
 
     switch (lpk->keyType) {
         case rsaKey:
             keyType = CKK_RSA;
-            PK11_SETATTRS(attrs, CKA_UNWRAP, (keyUsage & KU_KEY_ENCIPHERMENT) ? &cktrue
-                                                                              : &ckfalse,
+            PK11_SETATTRS(attrs, CKA_UNWRAP, (keyUsage & KU_KEY_ENCIPHERMENT) ? &cktrue : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
-            PK11_SETATTRS(attrs, CKA_DECRYPT, (keyUsage & KU_DATA_ENCIPHERMENT) ? &cktrue
-                                                                                : &ckfalse,
+            PK11_SETATTRS(attrs, CKA_DECRYPT, (keyUsage & KU_DATA_ENCIPHERMENT) ? &cktrue : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
-            PK11_SETATTRS(attrs, CKA_SIGN, (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue
-                                                                             : &ckfalse,
+            PK11_SETATTRS(attrs, CKA_SIGN, (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
             PK11_SETATTRS(attrs, CKA_SIGN_RECOVER,
                           (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue
                                                             : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
             ck_id = PK11_MakeIDFromPubKey(&lpk->u.rsa.modulus);
@@ -489,27 +486,25 @@ PK11_ImportAndReturnPrivateKey(PK11SlotI
                 goto loser;
             }
             if (PK11_IsInternal(slot)) {
                 PK11_SETATTRS(attrs, CKA_NETSCAPE_DB,
                               lpk->u.ec.publicValue.data,
                               lpk->u.ec.publicValue.len);
                 attrs++;
             }
-            PK11_SETATTRS(attrs, CKA_SIGN, (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue
-                                                                             : &ckfalse,
+            PK11_SETATTRS(attrs, CKA_SIGN, (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
             PK11_SETATTRS(attrs, CKA_SIGN_RECOVER,
                           (keyUsage & KU_DIGITAL_SIGNATURE) ? &cktrue
                                                             : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
-            PK11_SETATTRS(attrs, CKA_DERIVE, (keyUsage & KU_KEY_AGREEMENT) ? &cktrue
-                                                                           : &ckfalse,
+            PK11_SETATTRS(attrs, CKA_DERIVE, (keyUsage & KU_KEY_AGREEMENT) ? &cktrue : &ckfalse,
                           sizeof(CK_BBOOL));
             attrs++;
             ck_id = PK11_MakeIDFromPubKey(&lpk->u.ec.publicValue);
             if (ck_id == NULL) {
                 goto loser;
             }
             PK11_SETATTRS(attrs, CKA_ID, ck_id->data, ck_id->len);
             attrs++;
--- a/lib/pkcs12/p12local.c
+++ b/lib/pkcs12/p12local.c
@@ -262,18 +262,17 @@ sec_pkcs12_generate_key_from_password(SE
     }
 
     poolp = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
     if (poolp == NULL) {
         PORT_SetError(SEC_ERROR_NO_MEMORY);
         return NULL;
     }
 
-    pre_hash = (unsigned char *)PORT_ArenaZAlloc(poolp, sizeof(char) *
-                                                            (salt->len + password->len));
+    pre_hash = (unsigned char *)PORT_ArenaZAlloc(poolp, sizeof(char) * (salt->len + password->len));
     if (pre_hash == NULL) {
         PORT_SetError(SEC_ERROR_NO_MEMORY);
         goto loser;
     }
 
     hash_dest = (unsigned char *)PORT_ArenaZAlloc(poolp,
                                                   sizeof(unsigned char) * SHA1_LENGTH);
     if (hash_dest == NULL) {
--- a/lib/smime/cmsdecode.c
+++ b/lib/smime/cmsdecode.c
@@ -82,18 +82,17 @@ nss_cms_decoder_notify(void *arg, PRBool
     PRBool after = !before;
 
     p7dcx = (NSSCMSDecoderContext *)arg;
     rootcinfo = &(p7dcx->cmsg->contentInfo);
 
 /* XXX error handling: need to set p7dcx->error */
 
 #ifdef CMSDEBUG
-    fprintf(stderr, "%6.6s, dest = 0x%08x, depth = %d\n", before ? "before"
-                                                                 : "after",
+    fprintf(stderr, "%6.6s, dest = 0x%08x, depth = %d\n", before ? "before" : "after",
             dest, depth);
 #endif
 
     /* so what are we working on right now? */
     if (p7dcx->type == SEC_OID_UNKNOWN) {
         /*
          * right now, we are still decoding the OUTER (root) cinfo
          * As soon as we know the inner content type, set up the info,
--- a/lib/smime/cmsencode.c
+++ b/lib/smime/cmsencode.c
@@ -129,18 +129,17 @@ nss_cms_encoder_notify(void *arg, PRBool
     SECItem *item;
 
     p7ecx = (NSSCMSEncoderContext *)arg;
     PORT_Assert(p7ecx != NULL);
 
     rootcinfo = &(p7ecx->cmsg->contentInfo);
 
 #ifdef CMSDEBUG
-    fprintf(stderr, "%6.6s, dest = 0x%08x, depth = %d\n", before ? "before"
-                                                                 : "after",
+    fprintf(stderr, "%6.6s, dest = 0x%08x, depth = %d\n", before ? "before" : "after",
             dest, depth);
 #endif
 
     /*
      * Watch for the content field, at which point we want to instruct
      * the ASN.1 encoder to start taking bytes from the buffer.
      */
     if (NSS_CMSType_IsData(p7ecx->type)) {
--- a/lib/softoken/pkcs11c.c
+++ b/lib/softoken/pkcs11c.c
@@ -1522,18 +1522,17 @@ NSC_DecryptUpdate(CK_SESSION_HANDLE hSes
             rv = (*context->update)(context->cipherInfo, pPart, &padoutlen,
                                     maxout, context->padBuf, context->blockSize);
             if (rv != SECSuccess)
                 return sftk_MapDecryptError(PORT_GetError());
             pPart += padoutlen;
             maxout -= padoutlen;
         }
         /* now save the final block for the next decrypt or the final */
-        PORT_Memcpy(context->padBuf, &pEncryptedPart[ulEncryptedPartLen -
-                                                     context->blockSize],
+        PORT_Memcpy(context->padBuf, &pEncryptedPart[ulEncryptedPartLen - context->blockSize],
                     context->blockSize);
         context->padDataLength = context->blockSize;
         ulEncryptedPartLen -= context->padDataLength;
     }
 
     /* do it: NOTE: this assumes buf size in is >= buf size out! */
     rv = (*context->update)(context->cipherInfo, pPart, &outlen,
                             maxout, pEncryptedPart, ulEncryptedPartLen);
--- a/lib/util/quickder.c
+++ b/lib/util/quickder.c
@@ -515,18 +515,17 @@ DecodeGroup(void* dest,
             if (SECSuccess == rv && (anitem.len)) {
                 totalEntries++;
             }
         } while ((SECSuccess == rv) && (counter.len));
 
         if (SECSuccess == rv) {
             /* allocate room for pointer array and entries */
             /* we want to allocate the array even if there is 0 entry */
-            entries = (void**)PORT_ArenaZAlloc(arena, sizeof(void*) *
-                                                              (totalEntries + 1) + /* the extra one is for NULL termination */
+            entries = (void**)PORT_ArenaZAlloc(arena, sizeof(void*) * (totalEntries + 1) + /* the extra one is for NULL termination */
                                                           subTemplate->size * totalEntries);
 
             if (entries) {
                 entries[totalEntries] = NULL; /* terminate the array */
             } else {
                 PORT_SetError(SEC_ERROR_NO_MEMORY);
                 rv = SECFailure;
             }
--- a/lib/util/secasn1d.c
+++ b/lib/util/secasn1d.c
@@ -2716,19 +2716,17 @@ dump_states(SEC_ASN1DecoderContext *cx)
             printf("  ");
         }
 
         i = formatKind(state->theTemplate->kind, kindBuf);
         printf("%s: tmpl %08x, kind%s",
                (state == cx->current) ? "STATE" : "State",
                state->theTemplate,
                kindBuf);
-        printf(" %s", (state->place >= 0 && state->place <= notInUse)
-                          ? place_names[state->place]
-                          : "(undefined)");
+        printf(" %s", (state->place >= 0 && state->place <= notInUse) ? place_names[state->place] : "(undefined)");
         if (!i)
             printf(", expect 0x%02x",
                    state->expect_tag_number | state->expect_tag_modifiers);
 
         printf("%s%s%s %d\n",
                state->indefinite ? ", indef" : "",
                state->missing ? ", miss" : "",
                state->endofcontents ? ", EOC" : "",