Closed
Bug 541228
Opened 15 years ago
Closed 15 years ago
Remove an obsolete NSPR version check in lib/util/secport.c
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.12.6
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file, 2 obsolete files)
2.36 KB,
patch
|
Details | Diff | Splinter Review |
PORT_FreeArena in lib/util/secport.c has an NSPR version check
for NSPR version >= 4.1.1. The code in question apparently
depends on this change to mozilla/nsprpub/lib/ds/plarena.c in
NSPR 4.1.1 (bug 45343):
----------------------------
revision 3.6.2.1
date: 2001/04/04 17:34:23; author: larryh%netscape.com; state: Exp; lines: +105 -49
bugzilla: 45343
----------------------------
NSPR 4.1.1 is very old. NSS won't even start up with NSPR 4.1.1.
So we can assume NSPR version >= 4.1.1 is true and simplify that
code.
Note: A better way to do NSPR version check is to call the
NSPR function PR_VersionCheck("4.1.1").
Assignee | ||
Updated•15 years ago
|
Attachment #422844 -
Flags: review?(emaldona)
Comment 1•15 years ago
|
||
I actually prefer
if (!checkedEnv) {
/* no need for thread protection here */
doFreeArenaPool = (PR_GetEnv("NSS_DISABLE_ARENA_FREE_LIST") == NULL);
cehekedEnv = TRUE;
}
Comment 2•15 years ago
|
||
Sorry, I tabbed and it sent it before I was done typing. Using spaces now.
I find
if (!checkedEnv) {
/* no need for thread protection here */
doFreeArenaPool = (PR_GetEnv("NSS_DISABLE_ARENA_FREE_LIST") == NULL);
chekedEnv = TRUE;
}
a shade more readable but is more a personal thing. I'll give it r+.
Updated•15 years ago
|
Attachment #422844 -
Flags: review?(emaldona) → review+
Assignee | ||
Comment 3•15 years ago
|
||
I made the change Elio suggested and checked in the patch on the
NSS trunk (NSS 3.12.6).
Checking in secport.c;
/cvsroot/mozilla/security/nss/lib/util/secport.c,v <-- secport.c
new revision: 1.27; previous revision: 1.26
done
Attachment #422844 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: Remove an NSPR version check in lib/util/secport.c → Remove an obsolete NSPR version check in lib/util/secport.c
Target Milestone: --- → 3.12.6
Assignee | ||
Comment 4•15 years ago
|
||
I made a mistake when I made Elio's suggested change.
I have fixed the mistake.
Checking in secport.c;
/cvsroot/mozilla/security/nss/lib/util/secport.c,v <-- secport.c
new revision: 1.28; previous revision: 1.27
done
Attachment #422892 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•