[Bug 43912] New: wine-2.0.3/programs/wineboot/wineboot.c:684]: (style) Suspicious condition
https://bugs.winehq.org/show_bug.cgi?id=43912 Bug ID: 43912 Summary: wine-2.0.3/programs/wineboot/wineboot.c:684]: (style) Suspicious condition Product: Wine Version: 2.0.3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: programs Assignee: wine-bugs(a)winehq.org Reporter: dcb314(a)hotmail.com Distribution: --- wine-2.0.3/programs/wineboot/wineboot.c:684]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses. Source code is if ((res = RegCreateKeyExW( hkWin, szKeyName, 0, NULL, 0, bDelete ? KEY_ALL_ACCESS : KEY_READ, NULL, &hkRun, &dispos ) != ERROR_SUCCESS)) Maybe better code if ((res = RegCreateKeyExW( hkWin, szKeyName, 0, NULL, 0, bDelete ? KEY_ALL_ACCESS : KEY_READ, NULL, &hkRun, &dispos )) != ERROR_SUCCESS) -- 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=43912 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de --- Comment #1 from Fabian Maurer <dark.shadow4(a)web.de> --- Seems right, did you already send in a patch? -- 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=43912 --- Comment #2 from David Binderman <dcb314(a)hotmail.com> --- (In reply to Fabian Maurer from comment #1)
Seems right, did you already send in a patch?
No I leave patches to folks who know the code. -- 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=43912 --- Comment #3 from Fabian Maurer <dark.shadow4(a)web.de> ---
No I leave patches to folks who know the code.
I don't think there's much you could do wrong, you found a potential problem and propose a solution. If you understand it enough to propose a fix, why not send it in? Don't worry, if it's wrong then the reviewer will tell you. -- 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=43912 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gijsvrm(a)gmail.com --- Comment #4 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- https://source.winehq.org/git/wine.git/commit/8fc3f3437c260db23ddff453f9a9d5... -- 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=43912 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |8fc3f3437c260db23ddff453f9a | |9d5f79564b24d Status|UNCONFIRMED |RESOLVED --- Comment #5 from Nikolay Sivov <bunglehead(a)gmail.com> --- Marking fixed, 8fc3f3437c260db23ddff453f9a9d5f79564b24d. -- 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=43912 Giacomo Orlandi <gia_(a)inwind.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gia_(a)inwind.it --- Comment #6 from Giacomo Orlandi <gia_(a)inwind.it> --- I think it's better to avoid an assignment inside an if condition. You save 1 line but you lose a lot more in readability. And we wouldn't have needed any discussion about the parentheses either... I'm not bitching, just giving a suggestion! And I'm not a C programmer, but I'm my opinion this suggestion applies to all languages. -- 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=43912 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #7 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.20. -- 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=43912 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x -- 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=43912 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |--- --- Comment #8 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 2.0.x milestone from bugs included in 2.0.4. -- 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)
-
wine-bugs@winehq.org