Closed Bug 10087 Opened 25 years ago Closed 25 years ago

Should be const char when pointing to a const char

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P3)

Sun
Solaris
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Dan.Oscarsson, Assigned: chuang)

Details

File: mozilla/mailnews/addrbook/src/nsDirPrefs.cpp

Sun's compiler requires that a  char * pointing to a
const char * should be const char *

*** nsDirPrefs.cpp.org  Sun Jul 18 11:55:32 1999
--- nsDirPrefs.cpp      Sun Jul 18 11:55:33 1999
***************
*** 1070,1076 ****
  {
        PRBool rc = PR_FALSE;

!       char *endname =
XP_STRCHR(&fullprefname[PL_strlen(PREF_LDAP_SERVER_TREE_NAME) + 1], '.');
        if (endname)
        {
                char *prefname = (char *)PR_Malloc(endname - fullprefname + 1);
--- 1070,1076 ----
  {
        PRBool rc = PR_FALSE;

!       const char *endname =
XP_STRCHR(&fullprefname[PL_strlen(PREF_LDAP_SERVER_TREE_NAME) + 1], '.');
        if (endname)
        {
                char *prefname = (char *)PR_Malloc(endname - fullprefname + 1);
Assignee: hangas → chuang
Summary: Should be const char when pointing to a const char → Should be const char when pointing to a const char
This is Candice's code I am sending the bug to her.
Status: NEW → ASSIGNED
Target Milestone: M9
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fix checked in.(nsDirPrefs.cpp rev. 1.9)
QA has no resource to verify this bug.  Can I have your approval to just mark
it Verified or please advise.
Thanks,
Fenella
QA Contact: lchiang → ppandit
par, can you just verify that the new code is in?
Status: RESOLVED → VERIFIED
Line 1185 shows:
const char *endname = XP_STRCHR(&fullprefname[PL_strlen(PREF_LDAP_SERVER_TRE
E_NAME) + 1], '.');

VERIFIED using LXR
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.