diff options
author | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2016-02-25 15:28:52 +0100 |
---|---|---|
committer | Franziskus Kiefer <franziskuskiefer@gmail.com> | 2016-02-25 15:28:52 +0100 |
commit | 11a75954a8c9f7d0c94f089d595b8c1da3a5ca83 (patch) | |
tree | b60e60f4ace2e9be9c6eb9dca0c7f15d7fba6e51 /lib/crmf | |
parent | db6e138764000f48d554bcf63526896d0f8036f1 (diff) | |
download | nss-hg-11a75954a8c9f7d0c94f089d595b8c1da3a5ca83.tar.gz |
Bug 1251185, NSS clang-format: else line-break fixes, r=ttaubertNSS_3_23_BETA7
Diffstat (limited to 'lib/crmf')
-rw-r--r-- | lib/crmf/challcli.c | 3 | ||||
-rw-r--r-- | lib/crmf/cmmfchal.c | 3 | ||||
-rw-r--r-- | lib/crmf/cmmfrec.c | 3 | ||||
-rw-r--r-- | lib/crmf/cmmfresp.c | 12 | ||||
-rw-r--r-- | lib/crmf/crmfcont.c | 9 | ||||
-rw-r--r-- | lib/crmf/crmfget.c | 6 | ||||
-rw-r--r-- | lib/crmf/crmfpop.c | 3 | ||||
-rw-r--r-- | lib/crmf/crmfreq.c | 12 | ||||
-rw-r--r-- | lib/crmf/respcmn.c | 3 | ||||
-rw-r--r-- | lib/crmf/servget.c | 9 |
10 files changed, 21 insertions, 42 deletions
diff --git a/lib/crmf/challcli.c b/lib/crmf/challcli.c index f2e68594a..a92843894 100644 --- a/lib/crmf/challcli.c +++ b/lib/crmf/challcli.c @@ -182,8 +182,7 @@ CMMF_POPODecKeyChallContentGetRandomNumber(CMMFPOPODecKeyChallContent *inKeyChal CMMFChallenge *challenge; PORT_Assert(inKeyChallCont != NULL); - if (inKeyChallCont == NULL || inIndex > 0 || inIndex >= - inKeyChallCont->numChallenges) { + if (inKeyChallCont == NULL || inIndex > 0 || inIndex >= inKeyChallCont->numChallenges) { return SECFailure; } challenge = inKeyChallCont->challenges[inIndex]; diff --git a/lib/crmf/cmmfchal.c b/lib/crmf/cmmfchal.c index b2d33b9d7..13be227c3 100644 --- a/lib/crmf/cmmfchal.c +++ b/lib/crmf/cmmfchal.c @@ -214,8 +214,7 @@ CMMF_POPODecKeyChallContentSetNextChallenge(CMMFPOPODecKeyChallContent *inDecKey if (inDecKeyChall->numChallenges == 0) { rv = cmmf_create_first_challenge(inDecKeyChall, inRandom, genNameDER, inPubKey, passwdArg); - } - else { + } else { curChallenge = PORT_ArenaZNew(poolp, CMMFChallenge); if (curChallenge == NULL) { rv = SECFailure; diff --git a/lib/crmf/cmmfrec.c b/lib/crmf/cmmfrec.c index 068a0d84d..5dfe1fcca 100644 --- a/lib/crmf/cmmfrec.c +++ b/lib/crmf/cmmfrec.c @@ -107,8 +107,7 @@ CMMF_KeyRecRepContentSetCACerts(CMMFKeyRecRepContent *inKeyRecRep, &inKeyRecRep->caCerts); if (rv != SECSuccess) { PORT_ArenaRelease(inKeyRecRep->poolp, mark); - } - else { + } else { PORT_ArenaUnmark(inKeyRecRep->poolp, mark); } return rv; diff --git a/lib/crmf/cmmfresp.c b/lib/crmf/cmmfresp.c index 1be8c47f3..c8ff4bd75 100644 --- a/lib/crmf/cmmfresp.c +++ b/lib/crmf/cmmfresp.c @@ -52,8 +52,7 @@ cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert, if (derDest == NULL) { goto loser; } - } - else { + } else { derDest = SECITEM_DupItem(&inCert->derCert); if (derDest == NULL) { goto loser; @@ -67,8 +66,7 @@ cmmf_CertOrEncCertSetCertificate(CMMFCertOrEncCert *certOrEncCert, if (rv != SECSuccess) { goto loser; } - } - else { + } else { certOrEncCert->derValue = *derDest; } PORT_Free(derDest); @@ -218,8 +216,7 @@ CMMF_CertResponseSetCertificate(CMMFCertResponse *inCertResp, if (inCertResp->certifiedKeyPair == NULL) { keyPair = inCertResp->certifiedKeyPair = PORT_ZNew(CMMFCertifiedKeyPair); - } - else { + } else { keyPair = inCertResp->certifiedKeyPair; } if (keyPair == NULL) { @@ -266,8 +263,7 @@ CMMF_CertRepContentSetCAPubs(CMMFCertRepContent *inCertRepContent, if (rv != SECSuccess) { PORT_ArenaRelease(poolp, mark); - } - else { + } else { PORT_ArenaUnmark(poolp, mark); } return rv; diff --git a/lib/crmf/crmfcont.c b/lib/crmf/crmfcont.c index 6c7c10580..9cafdb1d7 100644 --- a/lib/crmf/crmfcont.c +++ b/lib/crmf/crmfcont.c @@ -19,8 +19,7 @@ crmf_modify_control_array(CRMFCertRequest *inCertReq, int count) return SECFailure; } inCertReq->controls = dummy; - } - else { + } else { inCertReq->controls = PORT_ZNewArray(CRMFControl *, 2); } return (inCertReq->controls == NULL) ? SECFailure : SECSuccess; @@ -593,8 +592,7 @@ crmf_get_public_value(SECKEYPublicKey *pubKey, SECItem *dest) if (rv != SECSuccess) { dest = NULL; } - } - else { + } else { dest = SECITEM_ArenaDupItem(NULL, src); } return dest; @@ -673,8 +671,7 @@ crmf_encrypted_value_unwrap_priv_key(PLArenaPool *poolp, if (wrappingKey == NULL) { goto loser; } /* Make the length a byte length instead of bit length*/ - params = (encValue->symmAlg != NULL) ? - crmf_decode_params(&encValue->symmAlg->parameters) + params = (encValue->symmAlg != NULL) ? crmf_decode_params(&encValue->symmAlg->parameters) : NULL; origLen = encValue->encValue.len; encValue->encValue.len = CRMF_BITS_TO_BYTES(origLen); diff --git a/lib/crmf/crmfget.c b/lib/crmf/crmfget.c index 86514a7ac..a61082c67 100644 --- a/lib/crmf/crmfget.c +++ b/lib/crmf/crmfget.c @@ -43,10 +43,8 @@ crmf_copy_cert_request_validity(PLArenaPool *poolp, CRMFOptionalValidity *myValidity = NULL; SECStatus rv; - *destValidity = myValidity = (poolp == NULL) ? - PORT_ZNew(CRMFOptionalValidity) - : - PORT_ArenaZNew(poolp, CRMFOptionalValidity); + *destValidity = myValidity = (poolp == NULL) ? PORT_ZNew(CRMFOptionalValidity) + : PORT_ArenaZNew(poolp, CRMFOptionalValidity); if (myValidity == NULL) { goto loser; } diff --git a/lib/crmf/crmfpop.c b/lib/crmf/crmfpop.c index 019875616..e20353c4e 100644 --- a/lib/crmf/crmfpop.c +++ b/lib/crmf/crmfpop.c @@ -203,8 +203,7 @@ crmf_create_poposignkey(PLArenaPool *poolp, if (useSignKeyInput) { goto loser; - } - else { + } else { rv = crmf_sign_certreq(poolp, signKey, certReq, inPrivKey, inAlgID); if (rv != SECSuccess) { goto loser; diff --git a/lib/crmf/crmfreq.c b/lib/crmf/crmfreq.c index 7dbf94c7c..483251636 100644 --- a/lib/crmf/crmfreq.c +++ b/lib/crmf/crmfreq.c @@ -351,8 +351,7 @@ crmf_template_add_extensions(PLArenaPool *poolp, CRMFCertTemplate *inTemplate, if (inTemplate->extensions == NULL) { newSize = extensions->numExtensions; extArray = PORT_ZNewArray(CRMFCertExtension *, newSize + 1); - } - else { + } else { newSize = inTemplate->numExtensions + extensions->numExtensions; extArray = PORT_Realloc(inTemplate->extensions, sizeof(CRMFCertExtension *) * (newSize + 1)); @@ -459,8 +458,7 @@ CRMF_CertRequestSetTemplateField(CRMFCertRequest *inCertReq, } if (rv != SECSuccess) { PORT_ArenaRelease(poolp, mark); - } - else { + } else { PORT_ArenaUnmark(poolp, mark); } return rv; @@ -551,10 +549,8 @@ crmf_create_cert_extension(PLArenaPool *poolp, } if (isCritical) { - newExt->critical.data = (poolp == NULL) ? - PORT_New(unsigned char) - : - PORT_ArenaNew(poolp, unsigned char); + newExt->critical.data = (poolp == NULL) ? PORT_New(unsigned char) + : PORT_ArenaNew(poolp, unsigned char); if (newExt->critical.data == NULL) { goto loser; } diff --git a/lib/crmf/respcmn.c b/lib/crmf/respcmn.c index 3f5f15ace..ecd006e97 100644 --- a/lib/crmf/respcmn.c +++ b/lib/crmf/respcmn.c @@ -218,8 +218,7 @@ cmmf_copy_secitem(PLArenaPool *poolp, SECItem *dest, SECItem *src) if (src->data != NULL) { rv = SECITEM_CopyItem(poolp, dest, src); - } - else { + } else { dest->data = NULL; dest->len = 0; rv = SECSuccess; diff --git a/lib/crmf/servget.c b/lib/crmf/servget.c index c36abfe23..5c72cb530 100644 --- a/lib/crmf/servget.c +++ b/lib/crmf/servget.c @@ -356,10 +356,8 @@ crmf_copy_poposigningkey(PLArenaPool *poolp, rv = SECITEM_CopyItem(poolp, &destPopoSignKey->derInput, &inPopoSignKey->derInput); } - destPopoSignKey->algorithmIdentifier = (poolp == NULL) ? - PORT_ZNew(SECAlgorithmID) - : - PORT_ArenaZNew(poolp, SECAlgorithmID); + destPopoSignKey->algorithmIdentifier = (poolp == NULL) ? PORT_ZNew(SECAlgorithmID) + : PORT_ArenaZNew(poolp, SECAlgorithmID); if (destPopoSignKey->algorithmIdentifier == NULL) { goto loser; @@ -634,8 +632,7 @@ crmf_copy_name(CERTName *destName, CERTName *srcName) if (destName->arena != NULL) { poolp = destName->arena; - } - else { + } else { poolp = PORT_NewArena(CRMF_DEFAULT_ARENA_SIZE); } if (poolp == NULL) { |