Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1295115 - follow up to clang-format for CI, r= kaie
--HG--
extra : rebase_source : df7f35fc5706a1523ea329362cdaaf87240e290f
extra : histedit_source : d469eeba994bf35d145cc4720f3098531402b5a5
  • Loading branch information
franziskuskiefer committed Aug 14, 2016
1 parent 462a771 commit acb5370
Show file tree
Hide file tree
Showing 49 changed files with 253 additions and 301 deletions.
11 changes: 4 additions & 7 deletions cmd/bltest/blapitest.c
Expand Up @@ -1236,8 +1236,7 @@ rsa_PublicKeyOp(void *cx, SECItem *output, const SECItem *input)
RSAPublicKey *pubKey = (RSAPublicKey *)params->pubKey;
SECStatus rv = RSA_PublicKeyOp(pubKey, output->data, input->data);
if (rv == SECSuccess) {
output->len = pubKey->modulus.data[0] ? pubKey->modulus.len :
pubKey->modulus.len - 1;
output->len = pubKey->modulus.data[0] ? pubKey->modulus.len : pubKey->modulus.len - 1;
}
return rv;
}
Expand All @@ -1249,8 +1248,7 @@ rsa_PrivateKeyOp(void *cx, SECItem *output, const SECItem *input)
RSAPrivateKey *privKey = (RSAPrivateKey *)params->privKey;
SECStatus rv = RSA_PrivateKeyOp(privKey, output->data, input->data);
if (rv == SECSuccess) {
output->len = privKey->modulus.data[0] ? privKey->modulus.len :
privKey->modulus.len - 1;
output->len = privKey->modulus.data[0] ? privKey->modulus.len : privKey->modulus.len - 1;
}
return rv;
}
Expand Down Expand Up @@ -2849,8 +2847,7 @@ dump_performance_info(bltestCipherInfo *infoList, double totalTimeInt,
ECPrivateKey *key = (ECPrivateKey *)info->params.asymk.privKey;
ECCurveName curveName = key->ecParams.name;
fprintf(stdout, "%12s",
ecCurve_map[curveName] ? ecCurve_map[curveName]->text :
"Unsupported curve");
ecCurve_map[curveName] ? ecCurve_map[curveName]->text : "Unsupported curve");
}
break;
#endif
Expand Down Expand Up @@ -3161,7 +3158,7 @@ verify_self_test(bltestIO *result, bltestIO *cmp, bltestCipherMode mode,
static SECStatus
ReadFileToItem(PLArenaPool *arena, SECItem *dst, const char *filename)
{
SECItem tmp = {siBuffer, NULL, 0};
SECItem tmp = { siBuffer, NULL, 0 };
PRFileDesc *file;
SECStatus rv;

Expand Down
23 changes: 11 additions & 12 deletions cmd/certcgi/certcgi.c
Expand Up @@ -883,8 +883,7 @@ AddAuthKeyID(void *extHandle,
error_out("ERROR: Unable to copy Directory Name");
}
authKeyID->authCertIssuer = genNames;
if (authKeyID->authCertIssuer == NULL && SECFailure ==
PORT_GetError()) {
if (authKeyID->authCertIssuer == NULL && SECFailure == PORT_GetError()) {
error_out("ERROR: Unable to get Issuer General Name for Authority Key ID Extension");
}
authKeyID->authCertSerialNumber = issuerCert->serialNumber;
Expand Down Expand Up @@ -2035,16 +2034,16 @@ main(int argc, char **argv)
char *pos;
#ifdef OFFLINE
char *form_output = "key=MIIBPTCBpzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA7"
"SLqjWBL9Wl11Vlg%0AaMqZCvcQOL%2FnvSqYPPRP0XZy9SoAeyWzQnBOiCm2t8H5mK7r2"
"jnKdAQOmfhjaJil%0A3hNVu3SekHOXF6Ze7bkWa6%2FSGVcY%2FojkydxFSgY43nd1iyd"
"zPQDp8WWLL%2BpVpt%2B%2B%0ATRhFtVXbF0fQI03j9h3BoTgP2lkCAwEAARYDZm9vMA0"
"GCSqGSIb3DQEBBAUAA4GB%0AAJ8UfRKJ0GtG%2B%2BufCC6tAfTzKrq3CTBHnom55EyXc"
"sAsv6WbDqI%2F0rLAPkn2Xo1r%0AnNhtMxIuj441blMt%2Fa3AGLOy5zmC7Qawt8IytvQ"
"ikQ1XTpTBCXevytrmLjCmlURr%0ANJryTM48WaMQHiMiJpbXCqVJC1d%2FpEWBtqvALzZ"
"aOOIy&subject=CN%3D%22test%22%26serial-auto%3Dtrue%26serial_value%3D%"
"26ver-1%3Dtrue%26ver-3%3Dfalse%26caChoiceradio-SignWithDefaultkey%3Dt"
"rue%26caChoiceradio-SignWithRandomChain%3Dfalse%26autoCAs%3D%26caChoi"
"ceradio-SignWithSpecifiedChain%3Dfalse%26manCAs%3D%26%24";
"SLqjWBL9Wl11Vlg%0AaMqZCvcQOL%2FnvSqYPPRP0XZy9SoAeyWzQnBOiCm2t8H5mK7r2"
"jnKdAQOmfhjaJil%0A3hNVu3SekHOXF6Ze7bkWa6%2FSGVcY%2FojkydxFSgY43nd1iyd"
"zPQDp8WWLL%2BpVpt%2B%2B%0ATRhFtVXbF0fQI03j9h3BoTgP2lkCAwEAARYDZm9vMA0"
"GCSqGSIb3DQEBBAUAA4GB%0AAJ8UfRKJ0GtG%2B%2BufCC6tAfTzKrq3CTBHnom55EyXc"
"sAsv6WbDqI%2F0rLAPkn2Xo1r%0AnNhtMxIuj441blMt%2Fa3AGLOy5zmC7Qawt8IytvQ"
"ikQ1XTpTBCXevytrmLjCmlURr%0ANJryTM48WaMQHiMiJpbXCqVJC1d%2FpEWBtqvALzZ"
"aOOIy&subject=CN%3D%22test%22%26serial-auto%3Dtrue%26serial_value%3D%"
"26ver-1%3Dtrue%26ver-3%3Dfalse%26caChoiceradio-SignWithDefaultkey%3Dt"
"rue%26caChoiceradio-SignWithRandomChain%3Dfalse%26autoCAs%3D%26caChoi"
"ceradio-SignWithSpecifiedChain%3Dfalse%26manCAs%3D%26%24";
#else
char *form_output;
#endif
Expand Down
9 changes: 3 additions & 6 deletions cmd/certutil/certutil.c
Expand Up @@ -3435,8 +3435,7 @@ certutil_main(int argc, char **argv, PRBool initialize)
certutil.options[opt_ExtendedEmailAddrs].arg,
certutil.options[opt_ExtendedDNSNames].arg,
certutil_extns,
(certutil.options[opt_GenericExtensions].activated ?
certutil.options[opt_GenericExtensions].arg
(certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg
: NULL),
certutil.options[opt_Pss].activated,
&certReqDER);
Expand All @@ -3461,8 +3460,7 @@ certutil_main(int argc, char **argv, PRBool initialize)
NULL,
NULL,
nullextnlist,
(certutil.options[opt_GenericExtensions].activated ?
certutil.options[opt_GenericExtensions].arg
(certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg
: NULL),
certutil.options[opt_Pss].activated,
&certReqDER);
Expand All @@ -3484,8 +3482,7 @@ certutil_main(int argc, char **argv, PRBool initialize)
certutil.commands[cmd_CreateNewCert].activated,
certutil.options[opt_SelfSign].activated,
certutil_extns,
(certutil.options[opt_GenericExtensions].activated ?
certutil.options[opt_GenericExtensions].arg
(certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg
: NULL),
certVersion,
&certDER);
Expand Down
2 changes: 1 addition & 1 deletion cmd/ecperf/ecperf.c
Expand Up @@ -86,7 +86,7 @@ static SECOidTag ecCurve_oid_map[] = {
SEC_OID_UNKNOWN, /* ECCurve_WTLS_1 */
SEC_OID_UNKNOWN, /* ECCurve_WTLS_8 */
SEC_OID_UNKNOWN, /* ECCurve_WTLS_9 */
SEC_OID_UNKNOWN /* ECCurve_pastLastCurve */
SEC_OID_UNKNOWN /* ECCurve_pastLastCurve */
};

typedef SECStatus (*op_func)(void *, void *, void *);
Expand Down
6 changes: 2 additions & 4 deletions cmd/httpserv/httpserv.c
Expand Up @@ -745,10 +745,8 @@ handle_connection(
/* else good status response */
if (!isPost && ocspMethodsAllowed == ocspGetUnknown) {
unknown = PR_TRUE;
nextUpdate = PR_Now() + (PRTime)60 * 60 *
24 * PR_USEC_PER_SEC; /*tomorrow*/
revoDate = PR_Now() - (PRTime)60 * 60 *
24 * PR_USEC_PER_SEC; /*yesterday*/
nextUpdate = PR_Now() + (PRTime)60 * 60 * 24 * PR_USEC_PER_SEC; /*tomorrow*/
revoDate = PR_Now() - (PRTime)60 * 60 * 24 * PR_USEC_PER_SEC; /*yesterday*/
}
}
}
Expand Down
13 changes: 6 additions & 7 deletions cmd/lib/basicutil.c
Expand Up @@ -687,13 +687,12 @@ static unsigned char
nibble(char c)
{
c = PORT_Tolower(c);
return (c >= '0' && c <= '9') ? c - '0' :
(c >=
'a' &&
c <=
'f')
? c - 'a' + 10
: -1;
return (c >= '0' && c <= '9') ? c - '0' : (c >=
'a' &&
c <=
'f')
? c - 'a' + 10
: -1;
}

SECStatus
Expand Down
5 changes: 2 additions & 3 deletions cmd/libpkix/testutil/testutil.h
Expand Up @@ -229,9 +229,8 @@ extern "C" {
} \
} while (0)

#define PKIX_TEST_ARENAS_ARG(arena) \
(arena ? (PORT_Strcmp(arena, "arenas") ? PKIX_FALSE : (j++, PKIX_TRUE)) : \
PKIX_FALSE)
#define PKIX_TEST_ARENAS_ARG(arena) \
(arena ? (PORT_Strcmp(arena, "arenas") ? PKIX_FALSE : (j++, PKIX_TRUE)) : PKIX_FALSE)

#define PKIX_TEST_ERROR_RECEIVED (pkixTestErrorMsg || pkixTestErrorResult)

Expand Down
6 changes: 2 additions & 4 deletions cmd/modutil/install.c
Expand Up @@ -406,10 +406,8 @@ Pk11Install_DoInstall(char *jarFile, const char *installDir,
* Show the user security information, allow them to abort or continue
*/
if (Pk11Install_UserVerifyJar(jar, PR_STDOUT,
force ?
PR_FALSE
:
PR_TRUE) &&
force ? PR_FALSE
: PR_TRUE) &&
!force) {
if (feedback) {
PR_fprintf(feedback, msgStrings[USER_ABORT]);
Expand Down
147 changes: 78 additions & 69 deletions cmd/modutil/installparse.c
Expand Up @@ -46,85 +46,94 @@ char *Pk11Install_yyerrstr = NULL;
#define STRING 259
#define YYERRCODE 256
/* clang-format on */
short yylhs[] = { -1,
0, 1, 1, 2, 2, 3, 4,
short yylhs[] = {
-1,
0, 1, 1, 2, 2, 3, 4,
};
short yylen[] = { 2,
1, 2, 0, 1, 1, 4, 1,
short yylen[] = {
2,
1, 2, 0, 1, 1, 4, 1,
};
short yydefred[] = { 0,
0, 0, 1, 0, 4, 0, 2, 0, 0, 6,
short yydefred[] = {
0,
0, 0, 1, 0, 4, 0, 2, 0, 0, 6,
};
short yydgoto[] = { 2,
3, 4, 5, 6,
short yydgoto[] = {
2,
3, 4, 5, 6,
};
short yysindex[] = { -257,
0, 0, 0, -257, 0, -252, 0, -257, -251, 0,
short yysindex[] = {
-257,
0, 0, 0, -257, 0, -252, 0, -257, -251, 0,
};
short yyrindex[] = { 6,
1, 0, 0, 3, 0, 0, 0, -250, 0, 0,
short yyrindex[] = {
6,
1, 0, 0, 3, 0, 0, 0, -250, 0, 0,
};
short yygindex[] = { 0,
-4, 0, 0, 0,
short yygindex[] = {
0,
-4, 0, 0, 0,
};
#define YYTABLESIZE 261
short yytable[] = { 7,
5, 1, 3, 9, 8, 3, 10, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 7, 5, 5,
short yytable[] = {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-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 257, 258, 259,
258,
short yycheck[] = {
4,
0, 259, 0, 8, 257, 0, 258, 258, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 257, 258, 259,
258,
};
/* clang-format on */
#define YYFINAL 2
Expand Down
3 changes: 1 addition & 2 deletions cmd/multinit/multinit.c
Expand Up @@ -502,8 +502,7 @@ do_list_certs(const char *progName, int log)

SECU_PrintCertNickname(node, stderr);
if (log) {
fprintf(stderr, "* Slot=%s*\n", cert->slot ?
PK11_GetTokenName(cert->slot)
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);
Expand Down
2 changes: 1 addition & 1 deletion cmd/p7env/p7env.c
Expand Up @@ -237,7 +237,7 @@ main(int argc, char **argv)
}

/* free certs */
for (rcpt = recipients; rcpt != NULL; ) {
for (rcpt = recipients; rcpt != NULL;) {
struct recipient *next = rcpt->next;
CERT_DestroyCertificate(rcpt->cert);
PORT_Free(rcpt->nickname);
Expand Down
6 changes: 2 additions & 4 deletions cmd/pk11util/pk11util.c
Expand Up @@ -1097,10 +1097,8 @@ printArg(Value *ptr, int arg_number)
} else {
constType = getConstFromAttribute(attribute->type);
if (constType != ConstNone) {
CK_ULONG value = (constType == ConstBool) ?
*(CK_BBOOL *)attribute->pValue
:
*(CK_ULONG *)attribute->pValue;
CK_ULONG value = (constType == ConstBool) ? *(CK_BBOOL *)attribute->pValue
: *(CK_ULONG *)attribute->pValue;
printConst(value, constType, 1);
} else {
printf("\n");
Expand Down

0 comments on commit acb5370

Please sign in to comment.