Closed Bug 336937 Opened 18 years ago Closed 18 years ago

Coverity 171, dead code in mozilla/security/nss/lib/softoken/pcertdb.c

Categories

(NSS :: Libraries, defect, P3)

3.11
All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.2

People

(Reporter: jonsmirl, Assigned: wtc)

Details

(Keywords: coverity, Whiteboard: CID 171)

Attachments

(1 file, 1 obsolete file)

AddNicknameToSubject()
{
// check for NUll is done at top of routine
    if ( nickname == NULL ) {
	return(SECFailure);
    }

This later check is not needed since the variable does not get changed

diff -r1.53 pcertdb.c
2797,2798c2797
<     entry->nickname = (nickname) ?
<                       PORT_ArenaStrdup(entry->common.arena, nickname) : NULL;
---
>     entry->nickname = PORT_ArenaStrdup(entry->common.arena, nickname);
Attached patch Remove dead code (obsolete) — Splinter Review
Hardware: PC → All
Target Milestone: --- → 3.11.2
Version: unspecified → 3.11
Severity: normal → trivial
Priority: -- → P3
Attachment #221127 - Flags: review?(wtchang)
Attachment #221127 - Attachment is obsolete: true
Attachment #221766 - Flags: review?(wtchang)
Attachment #221127 - Flags: review?(wtchang)
Comment on attachment 221766 [details] [diff] [review]
Unified diff, patch is the same

r=nelson
Attachment #221766 - Flags: review?(wtchang) → review+
I checked in the patch on the NSS trunk (NSS 3.12) and
NSS_3_11_BRANCH (NSS 3.11.2).
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee: nobody → wtchang
Whiteboard: CID 171
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: