Closed
Bug 337025
Opened 19 years ago
Closed 19 years ago
Coverity 411, dead code in mozilla/security/nss/lib/certdb/stanpcertdb.c
Categories
(NSS :: Libraries, defect, P5)
Tracking
(Not tracked)
RESOLVED
FIXED
3.11.2
People
(Reporter: jonsmirl, Assigned: alvolkov.bgs)
Details
(Keywords: coverity, Whiteboard: [CID 411])
Attachments
(2 files)
1.11 KB,
patch
|
nelson
:
review+
wtc
:
review+
|
Details | Diff | Splinter Review |
1.50 KB,
patch
|
alvolkov.bgs
:
review+
nelson
:
review+
|
Details | Diff | Splinter Review |
The checks for emailProfile!=NULL and profileTime!=NULL are redundant since they were checked to be not NULL a couple of lines earlier.
812 } else if (profileTime && emailProfile) {
@@ -815,18 +815,13 @@
NSSItem profTime, profData;
NSSItem *pprofTime, *pprofData;
NSSITEM_FROM_SECITEM(&subject, &cert->derSubject);
- if (profileTime) {
- NSSITEM_FROM_SECITEM(&profTime, profileTime);
- pprofTime = &profTime;
- } else {
- pprofTime = NULL;
- }
- if (emailProfile) {
- NSSITEM_FROM_SECITEM(&profData, emailProfile);
- pprofData = &profData;
- } else {
- pprofData = NULL;
- }
+
+ NSSITEM_FROM_SECITEM(&profTime, profileTime);
+ pprofTime = &profTime;
+
+ NSSITEM_FROM_SECITEM(&profData, emailProfile);
+ pprofData = &profData;
+
stanProfile = nssSMIMEProfile_Create(c, pprofTime, pprofData);
if (!stanProfile) goto loser;
nssrv = nssCryptoContext_ImportSMIMEProfile(cc, stanProfile);
Updated•19 years ago
|
Severity: normal → trivial
OS: Linux → All
Priority: -- → P5
Hardware: PC → All
Version: unspecified → 3.11
Comment 2•19 years ago
|
||
Comment on attachment 221213 [details] [diff] [review]
remove dead code
r=nelson
I'll ask Alexei to commit this.
Attachment #221213 -
Flags: review+
Updated•19 years ago
|
Target Milestone: --- → 3.11.2
Assignee | ||
Comment 3•19 years ago
|
||
trunk
/cvsroot/mozilla/security/nss/lib/certdb/stanpcertdb.c,v <-- stanpcertdb.c
new revision: 1.69; previous revision: 1.68
3.11 branch
/cvsroot/mozilla/security/nss/lib/certdb/stanpcertdb.c,v <-- stanpcertdb.c
new revision: 1.67.28.2; previous revision: 1.67.28.1
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Assignee: nobody → alexei.volkov.bugs
Comment 4•19 years ago
|
||
Comment on attachment 221213 [details] [diff] [review]
remove dead code
r=wtc. I found more dead code that can be removed.
I will attach a patch next.
Attachment #221213 -
Flags: review+
Comment 5•19 years ago
|
||
1. 'subject' is assigned but not used.
2. 'pprofTime' and 'pprofData' always have the
values &profTime and &profData and so aren't
necessary any more.
Attachment #222117 -
Flags: superreview?(nelson)
Attachment #222117 -
Flags: review?(alexei.volkov.bugs)
Comment 6•19 years ago
|
||
Comment on attachment 222117 [details] [diff] [review]
Remove more dead code
r=nelson
Attachment #222117 -
Flags: superreview?(nelson) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #222117 -
Flags: review?(alexei.volkov.bugs) → review+
Comment 7•19 years ago
|
||
Comment on attachment 222117 [details] [diff] [review]
Remove more dead code
I checked in this patch "remove more dead code" on
the NSS trunk (3.12) and NSS_3_11_BRANCH (3.11.2).
You need to log in
before you can comment on or make changes to this bug.
Description
•