Bug 72245 - ShapeWidg.c:204: possible bad if test ?
Summary: ShapeWidg.c:204: possible bad if test ?
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xmu (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 20:47 UTC by dcb314
Modified: 2013-12-06 23:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.