Closed
Bug 398568
Opened 18 years ago
Closed 18 years ago
PRBool misuse bugs in netwerk/
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: taras.mozilla, Assigned: taras.mozilla)
References
Details
Attachments
(1 file, 2 obsolete files)
8.23 KB,
patch
|
Biesinger
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
This is the automatic patch produced by prcheck. The misuse in netwerk is relatively harmless compared to other modules.
Attachment #283565 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 1•18 years ago
|
||
Updated patch to use !!. Took out the problematic hunk for now:
--- netwerk/base/src/nsLoadGroup.cpp 18 Jul 2007 21:37:40 -0000 1.73
+++ netwerk/base/src/nsLoadGroup.cpp 4 Oct 2007 17:03:39 -0000
@@ -708,17 +708,17 @@ nsLoadGroup::RemoveRequest(nsIRequest *r
// hash to an nsISupportsArray.
PR_STATIC_CALLBACK(PLDHashOperator)
AppendRequestsToISupportsArray(PLDHashTable *table, PLDHashEntryHdr *hdr,
PRUint32 number, void *arg)
{
RequestMapEntry *e = static_cast<RequestMapEntry *>(hdr);
nsISupportsArray *array = static_cast<nsISupportsArray *>(arg);
- PRBool ok = array->AppendElement(e->mKey);
+ PRBool ok = !!array->AppendElement(e->mKey);
if (!ok) {
return PL_DHASH_STOP;
}
return PL_DHASH_NEXT;
}
Attachment #283565 -
Attachment is obsolete: true
Attachment #283757 -
Flags: review?(cbiesinger)
Attachment #283565 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 2•18 years ago
|
||
The problem is that nsISupportsArray inherits from nsICollection which specifies AppendElement as returning nsresult.
Comment 3•18 years ago
|
||
Comment on attachment 283757 [details] [diff] [review]
PRBool fixes, take 2
I preferred 0 !=...
Attachment #283757 -
Flags: review?(cbiesinger) → review-
Assignee | ||
Comment 4•18 years ago
|
||
Same as original patch but without the AppendElement() issue.
Note that this would be the only patch in the series to use 0 !=.
Attachment #283757 -
Attachment is obsolete: true
Attachment #284176 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 5•18 years ago
|
||
Christian,
Can you review the patch?
Updated•18 years ago
|
Attachment #284176 -
Flags: review?(cbiesinger) → review+
Updated•18 years ago
|
Attachment #284176 -
Flags: approval1.9?
Comment 6•18 years ago
|
||
Comment on attachment 284176 [details] [diff] [review]
PRBool fixes, take 3
a1.9+=damons
Attachment #284176 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 7•18 years ago
|
||
Checking in netwerk/cache/src/nsCacheRequest.h;
/cvsroot/mozilla/netwerk/cache/src/nsCacheRequest.h,v <-- nsCacheRequest.h
new revision: 1.19; previous revision: 1.18
done
Checking in netwerk/cache/src/nsCacheSession.h;
/cvsroot/mozilla/netwerk/cache/src/nsCacheSession.h,v <-- nsCacheSession.h
new revision: 1.6; previous revision: 1.5
done
Checking in netwerk/cache/src/nsDiskCacheMap.h;
/cvsroot/mozilla/netwerk/cache/src/nsDiskCacheMap.h,v <-- nsDiskCacheMap.h
new revision: 1.20; previous revision: 1.19
done
Checking in netwerk/cookie/src/nsCookieService.cpp;
/cvsroot/mozilla/netwerk/cookie/src/nsCookieService.cpp,v <-- nsCookieService.cpp
new revision: 1.87; previous revision: 1.86
done
Checking in netwerk/protocol/http/src/nsHttpChannel.cpp;
/cvsroot/mozilla/netwerk/protocol/http/src/nsHttpChannel.cpp,v <-- nsHttpChannel.cpp
new revision: 1.327; previous revision: 1.326
done
Checking in netwerk/streamconv/converters/mozTXTToHTMLConv.cpp;
/cvsroot/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp,v <-- mozTXTToHTMLConv.cpp
new revision: 1.87; previous revision: 1.86
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•