Closed Bug 334288 Opened 16 years ago Closed 9 years ago
use early returns in ns
Object Loading Content::Is Supported Document
coverity doesn't like this code, but it's wrong in claiming that it's dangerous. i don't like this code either, so this bug is a request for: if (!info) return PR_FALSE; it simplifies the code and happens to quiet coverity (which complains that supported is used uninitialized - in the impossible case of do_GetService setting info to null and rv to ns_ok).
Comment on attachment 218659 [details] [diff] [review] use early returns Single-line ifs should be braced in this code. Also, I'd like to see both the -w diff and a normal one.
Attachment #218659 - Flags: superreview?(bzbarsky) → superreview-
Comment on attachment 218659 [details] [diff] [review] use early returns what bz said
Comment on attachment 650304 [details] [diff] [review] Use early returns in nsObjectLoadingContent::IsSupportedDocument Resurrecting from the grave!
Assignee: timeless → jschoenick
OS: Mac OS X → All
Hardware: PowerPC → All
Attachment #218659 - Attachment is obsolete: true
Maybe a version that compiles would be preferable
Comment on attachment 650344 [details] [diff] [review] Use early returns in nsObjectLoadingContent::IsSupportedDocument r=me
Attachment #650344 - Flags: review?(bzbarsky) → review+
Survived a try push here: https://tbpl.mozilla.org/?tree=Try&rev=02f602af452c Landed on m-i: http://hg.mozilla.org/integration/mozilla-inbound/rev/08631f0a9b1d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.