Closed Bug 618793 Opened 14 years ago Closed 14 years ago

please add a return or comment in STATUS_REJECTED case of nsCookieService::SetCookieStringInternal switch to explain common return with STATUS_REJECTED_WITH_ERROR

Categories

(Core :: Networking: Cookies, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Attachments

(1 file)

1498 nsCookieService::SetCookieStringInternal(nsIURI          *aHostURI,
1503 {

1526   CookieStatus cookieStatus = CheckPrefs(aHostURI, aIsForeign, baseDomain,
1527                                          requireHostMatch, aCookieHeader.get());
1528   // fire a notification if cookie was rejected (but not if there was an error)
1529   switch (cookieStatus) {
1530   case STATUS_REJECTED:
1531     NotifyRejected(aHostURI);

coverity complains that there's a missing break/return/comment <here>. I agree.
It would be clearer to have an extra return here or a comment indicating that we want to continue with the code in STATUS_REJECTED_WITH_ERROR
1532   case STATUS_REJECTED_WITH_ERROR:
1533     return;
1534   default:
1535     break;
1536   }
Patches accepted!
Attached patch add return (deleted) — Splinter Review
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #497313 - Flags: review?(dwitte)
Comment on attachment 497313 [details] [diff] [review]
add return

r=dwitte
Attachment #497313 - Flags: review?(dwitte) → review+
Attachment #497313 - Flags: approval2.0?
Comment on attachment 497313 [details] [diff] [review]
add return

Mass minusing patch approval that don't have high return. Please renominate if this is more important for 2.0 than it appears.
Attachment #497313 - Flags: approval2.0? → approval2.0-
http://hg.mozilla.org/mozilla-central/rev/6f30dccd813a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: