Bug 110760 - bad source code
bad source code
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: hdparm (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 09:57 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-11-24 11:26:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-11-24 09:57:59 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package hdparm-5_4-3 from Fedora.

The compiler said

hdparm.c(1241): warning #187: use of "=" where "==" may have been 
intended

The source code is

                 && (args[0] = WIN_CHECKPOWERMODE2) /* try again with 
0x98 */

Might be better with

                 && (args[0] == WIN_CHECKPOWERMODE2) /* try again 
with 0x98 */


Version-Release number of selected component (if applicable):
hdparm-5_4-3 

How reproducible:
Always

Steps to Reproduce:
1. by inspection
2.
3.
    

Additional info:
Comment 1 Karsten Hopp 2003-11-24 11:26:02 EST
Thats's ugly code, but one single '=' is intended here to try 
the ioctl again with different parameters. 
Comment 2 d.binderman 2003-11-26 05:00:25 EST
>Thats's ugly code

Agreed. Not good software engineering either.

Any interest in tidying it up ?

&& ((args[0] = WIN_CHECKPOWERMODE2) != 0)




Note You need to log in before you can comment on or make changes to this bug.