Closed
Bug 1227624
Opened 8 years ago
Closed 8 years ago
NSS clang-format: lib/certcb
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(firefox45 affected)
RESOLVED
FIXED
3.22
Tracking | Status | |
---|---|---|
firefox45 | --- | affected |
People
(Reporter: franziskus, Assigned: franziskus)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 4 obsolete files)
10.79 KB,
patch
|
franziskus
:
review+
wtc
:
review+
KaiE
:
checked-in+
|
Details | Diff | Splinter Review |
768.80 KB,
patch
|
KaiE
:
review+
|
Details | Diff | Splinter Review |
Applying clang-format to lib/certdb.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8691867 -
Attachment description: lib/certdb clang-format → lib/certdb clang-format protection
Assignee | ||
Comment 2•8 years ago
|
||
here another patch with clang format and protection (first patch) for lib/certdb. Who ever has time for this can get to review it, otherwise just cancel the needinfo. For better context, both patches are also uploaded here protection: https://codereview.appspot.com/275560043/ clang-format: https://codereview.appspot.com/275560044/
Flags: needinfo?(wtc)
Flags: needinfo?(rrelyea)
Flags: needinfo?(martin.thomson)
Flags: needinfo?(kaie)
Assignee | ||
Comment 3•8 years ago
|
||
I updated both patches
Assignee | ||
Comment 4•8 years ago
|
||
r+ by wtc on Rietval (https://codereview.appspot.com/275560043/)
Attachment #8691867 -
Attachment is obsolete: true
Attachment #8694192 -
Flags: review+
Comment 5•8 years ago
|
||
Comment on attachment 8694192 [details] [diff] [review] lib/certdb clang-format protection Review of attachment 8694192 [details] [diff] [review]: ----------------------------------------------------------------- r=wtc. Please fix the two nits I noted. ::: lib/certdb/alg1485.c @@ +27,4 @@ > /* Add new entries to this table, and maybe to function ParseRFC1485AVA */ > static const NameToKind name2kinds[] = { > /* IANA registered type names > * (See: http://www.iana.org/assignments/ldap-parameters) Nit: please delete the space at the end of this line (visible in the code review tool). ::: lib/certdb/genname.c @@ +1585,1 @@ > #define ANSSI_SUBJECT_DN \ Nit: I think this backslash should be moved to the end of the line to match clang-format?
Attachment #8694192 -
Flags: review+
Assignee | ||
Comment 6•8 years ago
|
||
fixed nits, r+ carries over
Attachment #8694192 -
Attachment is obsolete: true
Attachment #8694651 -
Flags: review+
Updated•8 years ago
|
Attachment #8694651 -
Flags: review+
Updated•8 years ago
|
Flags: needinfo?(martin.thomson)
Comment 7•8 years ago
|
||
Comment on attachment 8694651 [details] [diff] [review] lib/certdb clang-format protection https://hg.mozilla.org/projects/nss/rev/0b33a0841798
Attachment #8694651 -
Flags: checked-in+
Assignee | ||
Comment 8•8 years ago
|
||
rebased after protection changes
Attachment #8691868 -
Attachment is obsolete: true
Comment 9•8 years ago
|
||
In file lib/certdb/alg1485.c, in cert_AVAOidTagToMaxLen and the functions that follow after it, it uses an indent of 2 spaces, not 4. I wonder why that happened, because in other files it uses the correct indent of 4 spaces. I see our format definition has ObjCBlockIndentWidth: 2 Does clang-format incorrectly assume that file alg1485.c is an object-c file ? Does it use 4 spaces if you set ObjCBlockIndentWidth to 4 ?
Flags: needinfo?(kaie)
Comment 10•8 years ago
|
||
FWIW, (unpatched) clang-format version 3.7 correctly indents alg1485.c with 4 spaces.
Assignee | ||
Comment 11•8 years ago
|
||
thanks kai. not sure what happened to that file. This is a new patch where the indent looks correct (it's the same as the last one at https://codereview.appspot.com/275560044 if you want to check the differences).
Attachment #8696690 -
Attachment is obsolete: true
Flags: needinfo?(kaie)
Comment 12•8 years ago
|
||
Comment on attachment 8696937 [details] [diff] [review] lib/certdb clang-format r=kaie I skimmed through it, and it seems OK. I found the following minor issues, but I think, if we want to fix them, they should be done in a follow-up patch. (a) +#define CASE(i, m) \ + case i: \ + CGET(i, m); \ + if (!n) \ + goto unsupported /* fall-through */ indent the goto (b) + /* If tag name is too long, we know it is an OID form that was + * allocated from the heap, so we can modify it in place + */ The first line of a multi line comment gets indented incorrectly. There are multiple places like this. (c) if (rv == SECSuccess && - ((trust.sslFlags & CERTDB_USER ) || - (trust.emailFlags & CERTDB_USER ) || - (trust.objectSigningFlags & CERTDB_USER )) ) { + ((trust.sslFlags & CERTDB_USER) || (trust.emailFlags & CERTDB_USER) || + (trust.objectSigningFlags & CERTDB_USER))) { The original style was more readable, but I think the new one is acceptable and can be kept.
Flags: needinfo?(wtc)
Flags: needinfo?(rrelyea)
Flags: needinfo?(kaie)
Attachment #8696937 -
Flags: review+
Comment 13•8 years ago
|
||
https://hg.mozilla.org/projects/nss/rev/3896627e2a2f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.22
You need to log in
before you can comment on or make changes to this bug.
Description
•