Closed Bug 336984 Opened 18 years ago Closed 18 years ago

Useless null check of aNewLeftNode in nsEditor::SplitNode

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity)

Attachments

(1 obsolete file)

 
Attached patch remove useless null check (obsolete) — Splinter Review
Assignee: mozeditor → timeless
Status: NEW → ASSIGNED
Attachment #221191 - Flags: superreview?(neil)
Attachment #221191 - Flags: review?(neil)
Comment on attachment 221191 [details] [diff] [review]
remove useless null check

>diff -pU40 -r1.464 mozilla/editor/libeditor/base/nsEditor.cpp
-pu9 would have sufficed:

>   mRangeUpdater.SelAdjSplitNode(aNode, aOffset, *aNewLeftNode);
> 
>   if (mActionListeners)
>   {
>     for (i = 0; i < mActionListeners->Count(); i++)
>     {
>       listener = (nsIEditActionListener *)mActionListeners->ElementAt(i);
>       if (listener)
>       {
>-        nsIDOMNode *ptr = (aNewLeftNode) ? *aNewLeftNode : 0;
>+        nsIDOMNode *ptr = *aNewLeftNode;
Attachment #221191 - Flags: superreview?(neil)
Attachment #221191 - Flags: superreview+
Attachment #221191 - Flags: review?(neil)
Attachment #221191 - Flags: review+
Comment on attachment 221191 [details] [diff] [review]
remove useless null check

mozilla/editor/libeditor/base/nsEditor.cpp 	1.465
Attachment #221191 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: