Red Hat Bugzilla – Bug 110760
bad source code
Last modified: 2007-11-30 17:10:34 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
The source code is
&& (args = WIN_CHECKPOWERMODE2) /* try again with
Might be better with
&& (args == WIN_CHECKPOWERMODE2) /* try again
with 0x98 */
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. by inspection
Thats's ugly code, but one single '=' is intended here to try
the ioctl again with different parameters.
>Thats's ugly code
Agreed. Not good software engineering either.
Any interest in tidying it up ?
&& ((args = WIN_CHECKPOWERMODE2) != 0)