[Bug 49174] New: Duplicate checking iter->parent in mshtml/htmlwindow.c
https://bugs.winehq.org/show_bug.cgi?id=49174 Bug ID: 49174 Summary: Duplicate checking iter->parent in mshtml/htmlwindow.c Product: Wine Version: 5.8 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mshtml Assignee: wine-bugs(a)winehq.org Reporter: mikrutrafal54(a)gmail.com Distribution: --- Should be probably `iter && iter->parent` https://github.com/wine-mirror/wine/blob/59987bc9ecdd0dbafd768a95c21a14884bc... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49174 Michael McGuire <spoon0042(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |spoon0042(a)hotmail.com --- Comment #1 from Michael McGuire <spoon0042(a)hotmail.com> --- If you really wanted you could check window == NULL and return, saving a test. :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49174 --- Comment #2 from Michael McGuire <spoon0042(a)hotmail.com> --- Or even: void get_top_window(HTMLOuterWindow *window, HTMLOuterWindow **ret) { HTMLOuterWindow *iter = window; if (iter) while (iter->parent) iter = iter->parent; *ret = iter; } I may be bored. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49174 --- Comment #3 from Michael McGuire <spoon0042(a)hotmail.com> --- Still bored so for fun I did a quick test and gcc optimizes out a test anyway (with -O2) resulting in identical assembly for the loop. I'll shut up now. :) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49174 Jacek Caban <jacek(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d202e4a3864c1f15730e3e3c63e | |2928e6171c2cb Resolution|--- |FIXED CC| |jacek(a)codeweavers.com Status|UNCONFIRMED |RESOLVED --- Comment #4 from Jacek Caban <jacek(a)codeweavers.com> --- https://source.winehq.org/git/wine.git/commitdiff/d202e4a3864c1f15730e3e3c63... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=49174 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.0-rc5. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla