125 lines
4.5 KiB
Diff
125 lines
4.5 KiB
Diff
diff -up ./cmd/p7sign/p7sign.c.fix_warnings ./cmd/p7sign/p7sign.c
|
|
--- ./cmd/p7sign/p7sign.c.fix_warnings 2016-02-07 15:29:48.459494920 -0800
|
|
+++ ./cmd/p7sign/p7sign.c 2016-02-07 15:55:04.920963101 -0800
|
|
@@ -92,21 +92,24 @@ SignFile(FILE *outFile, PRFileDesc *inFi
|
|
SEC_PKCS7ContentInfo *cinfo;
|
|
SECStatus rv;
|
|
|
|
- if (outFile == NULL || inFile == NULL || cert == NULL)
|
|
- return -1;
|
|
+ if (outFile == NULL || inFile == NULL || cert == NULL) {
|
|
+ return -1;
|
|
+ }
|
|
|
|
/* suck the file in */
|
|
- if (SECU_ReadDERFromFile(&data2sign, inFile, PR_FALSE,
|
|
- PR_FALSE) != SECSuccess)
|
|
- return -1;
|
|
+ if (SECU_ReadDERFromFile(&data2sign, inFile, PR_FALSE,
|
|
+ PR_FALSE) != SECSuccess) {
|
|
+ return -1;
|
|
+ }
|
|
|
|
if (!encapsulated) {
|
|
/* unfortunately, we must create the digest ourselves */
|
|
/* SEC_PKCS7CreateSignedData should have a flag to not include */
|
|
/* the content for non-encapsulated content at encode time, but */
|
|
/* should always compute the hash itself */
|
|
- if (CreateDigest(&data2sign, digestdata, &len, 32) < 0)
|
|
- return -1;
|
|
+ if (CreateDigest(&data2sign, digestdata, &len, 32) < 0) {
|
|
+ return -1;
|
|
+ }
|
|
digest.data = (unsigned char *)digestdata;
|
|
digest.len = len;
|
|
}
|
|
@@ -116,9 +119,9 @@ SignFile(FILE *outFile, PRFileDesc *inFi
|
|
SEC_OID_SHA1,
|
|
encapsulated ? NULL : &digest,
|
|
NULL, NULL);
|
|
- if (cinfo == NULL)
|
|
+ if (cinfo == NULL) {
|
|
return -1;
|
|
-
|
|
+ }
|
|
if (encapsulated) {
|
|
SEC_PKCS7SetContent(cinfo, (char *)data2sign.data, data2sign.len);
|
|
}
|
|
@@ -134,8 +137,9 @@ SignFile(FILE *outFile, PRFileDesc *inFi
|
|
|
|
SEC_PKCS7DestroyContentInfo (cinfo);
|
|
|
|
- if (rv != SECSuccess)
|
|
+ if (rv != SECSuccess) {
|
|
return -1;
|
|
+ }
|
|
|
|
return 0;
|
|
}
|
|
diff -up ./cmd/vfychain/vfychain.c.fix_warnings ./cmd/vfychain/vfychain.c
|
|
--- ./cmd/vfychain/vfychain.c.fix_warnings 2016-02-07 16:03:13.189775733 -0800
|
|
+++ ./cmd/vfychain/vfychain.c 2016-02-07 16:22:33.709073372 -0800
|
|
@@ -439,7 +439,7 @@ main(int argc, char *argv[], char *envp[
|
|
case 0 : /* positional parameter */ goto breakout;
|
|
case 'a' : isAscii = PR_TRUE; break;
|
|
case 'b' : secStatus = DER_AsciiToTime(&time, optstate->value);
|
|
- if (secStatus != SECSuccess) Usage(progName); break;
|
|
+ if (secStatus != SECSuccess) { Usage(progName); } break;
|
|
case 'd' : certDir = PL_strdup(optstate->value); break;
|
|
case 'e' : ocsp_fetchingFailureIsAFailure = PR_FALSE; break;
|
|
case 'f' : certFetching = PR_TRUE; break;
|
|
@@ -484,9 +484,9 @@ main(int argc, char *argv[], char *envp[
|
|
case 't' : trusted = PR_TRUE; break;
|
|
case 'T' : onlyTrustAnchors = PR_FALSE; break;
|
|
case 'u' : usage = PORT_Atoi(optstate->value);
|
|
- if (usage < 0 || usage > 62) Usage(progName);
|
|
+ if (usage < 0 || usage > 62) { Usage(progName); }
|
|
certUsage = ((SECCertificateUsage)1) << usage;
|
|
- if (certUsage > certificateUsageHighest) Usage(progName);
|
|
+ if (certUsage > certificateUsageHighest) { Usage(progName); }
|
|
break;
|
|
case 'w':
|
|
pwdata.source = PW_PLAINTEXT;
|
|
diff -up ./lib/dbm/src/hash.c.fix_warnings ./lib/dbm/src/hash.c
|
|
--- ./lib/dbm/src/hash.c.fix_warnings 2016-02-07 15:18:54.006925157 -0800
|
|
+++ ./lib/dbm/src/hash.c 2016-02-07 15:21:02.151491099 -0800
|
|
@@ -815,9 +815,9 @@ hash_access(
|
|
}
|
|
|
|
ovfl_loop_count++;
|
|
- if(ovfl_loop_count > MAX_OVERFLOW_HASH_ACCESS_LOOPS)
|
|
+ if(ovfl_loop_count > MAX_OVERFLOW_HASH_ACCESS_LOOPS) {
|
|
return (DATABASE_CORRUPTED_ERROR);
|
|
-
|
|
+ }
|
|
/* FOR LOOP INIT */
|
|
bp = (uint16 *)rbufp->page;
|
|
n = *bp++;
|
|
@@ -825,8 +825,9 @@ hash_access(
|
|
off = hashp->BSIZE;
|
|
} else if (bp[1] < REAL_KEY) {
|
|
if ((ndx =
|
|
- __find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0)
|
|
+ __find_bigpair(hashp, rbufp, ndx, kp, (int)size)) > 0) {
|
|
goto found;
|
|
+ }
|
|
if (ndx == -2) {
|
|
bufp = rbufp;
|
|
if (!(pageno =
|
|
diff -up ./lib/dbm/src/h_page.c.fix_warnings ./lib/dbm/src/h_page.c
|
|
--- ./lib/dbm/src/h_page.c.fix_warnings 2016-01-29 02:30:10.000000000 -0800
|
|
+++ ./lib/dbm/src/h_page.c 2016-02-07 15:10:42.439250993 -0800
|
|
@@ -114,9 +114,9 @@ long new_lseek(int fd, long offset, int
|
|
|
|
if(origin == SEEK_CUR)
|
|
{
|
|
- if(offset < 1)
|
|
- return(lseek(fd, offset, SEEK_CUR));
|
|
-
|
|
+ if(offset < 1) {
|
|
+ return(lseek(fd, offset, SEEK_CUR));
|
|
+ }
|
|
cur_pos = lseek(fd, 0, SEEK_CUR);
|
|
|
|
if(cur_pos < 0)
|