Bug 72245

Summary: ShapeWidg.c:204: possible bad if test ?
Product: xorg Reporter: dcb314
Component: Lib/XmuAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description dcb314 2013-12-02 20:47:54 UTC
I just ran the static analyser "cppcheck" over the source
code of libXmu-1.1.1. It said

[ShapeWidg.c:204] -> [ShapeWidg.c:204]: (style) Same expression on both sides of '||'.

Source code is

  if (width < 3 || width < 3)
    return;

Maybe 

  if (width < 3 || height < 3)
    return;

would be better code.
Comment 1 Alan Coopersmith 2013-12-02 21:05:45 UTC
Thanks for the report - fix submitted to xorg-devel for review:
http://patchwork.freedesktop.org/patch/16192/
Comment 2 Alan Coopersmith 2013-12-06 23:27:25 UTC
Fix pushed to git master:
http://cgit.freedesktop.org/xorg/lib/libXmu/commit/?id=22d9c590901e121936f50dee97dc60c4f7defb63

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.