Minor optimization in nsLocalfile::Append

RESOLVED FIXED in mozilla0.9.2

Status

()

RESOLVED FIXED
18 years ago
18 years ago

People

(Reporter: sfraser_bugs, Assigned: ccarlen)

Tracking

Trunk
mozilla0.9.2
PowerPC
Mac System 8.5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
nsLocalFile::Append(const char *node)
{
  if (!node || (strstr(node, ":") != nsnull))
    return NS_ERROR_FILE_UNRECOGNIZED_PATH;

  return AppendRelativePath(node);
}

Should replace strstr with strchr, which will be more efficient.
(Assignee)

Comment 1

18 years ago
True - easy enough.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2

Comment 2

18 years ago
can I get an r= from Conrad and an sr=sfraser?

Index: mozilla/xpcom/io/nsLocalFileMac.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/io/nsLocalFileMac.cpp,v
retrieving revision 1.60
diff -r1.60 nsLocalFileMac.cpp
1218c1218
<   if (!node || (strstr(node, ":") != nsnull))
---
>   if (!node || (strchr(node, ':') != nsnull))
(Reporter)

Comment 3

18 years ago
sr=sfraser
(Assignee)

Comment 4

18 years ago
r=ccarlen

Updated

18 years ago
Blocks: 83989

Comment 5

18 years ago
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)

Comment 6

18 years ago
fix is in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.