Closed Bug 398595 Opened 18 years ago Closed 14 years ago

PRBool misuse bugs in editor/

Categories

(Core :: DOM: Editor, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: taras.mozilla, Assigned: taras.mozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

These issues were found by prcheck. I'm not sure about rv = mDocStateListeners[i]->NotifyDocumentStateChanged(0 != (mDocDirtyState)); I'm not sure if NotifyDocumentStateChanged receiver always expects a prbool. Signature might be wrong. PRBool nsHTMLEditor::GetNumberOfCellsInRow(nsIDOMElement* aTable, PRInt32 rowIndex) is wrong. The signature is a prbool, it returns a cell count OR an error in the same field. I'm leaving the patch as the tool produced there.
Attachment #283594 - Flags: review?(daniel)
Changed code to use !! instead of 0 != to be consistent with other modules.
Attachment #283785 - Flags: review?(daniel)
Attachment #283594 - Attachment is obsolete: true
Attachment #283594 - Flags: review?(daniel)
Daniel, Could you review this please?
Comment on attachment 283785 [details] [diff] [review] This isn't meant to be applied. See comments in the bug roc, can you shed some light on the concerns mentioned int the bug?
Attachment #283785 - Flags: superreview?(roc)
(In reply to comment #0) > These issues were found by prcheck. > > I'm not sure about > rv = mDocStateListeners[i]->NotifyDocumentStateChanged(0 != (mDocDirtyState)); > > I'm not sure if NotifyDocumentStateChanged receiver always expects a prbool. > Signature might be wrong. It does, your change is correct. > PRBool nsHTMLEditor::GetNumberOfCellsInRow(nsIDOMElement* aTable, PRInt32 > rowIndex) is wrong. The signature is a prbool, it returns a cell count OR an > error in the same field. I'm leaving the patch as the tool produced there. I'd change the result to PRInt32 and return -1 on failure.
Attachment #283785 - Flags: superreview?(roc) → superreview-
Comment on attachment 283785 [details] [diff] [review] This isn't meant to be applied. See comments in the bug Patch needs to be updated, see comment #5
Comment on attachment 283785 [details] [diff] [review] This isn't meant to be applied. See comments in the bug Clearing review since these issues have been resolved through other bugs.
Attachment #283785 - Flags: review?(daniel)
Issues resolved by bug 671417 and bug 671185 .
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: