[Cpufreqd-devel] [PATCH] logical error for CPU_ALL in cpu_evaluate
Brought to you by:
mattia-san
|
From: Martin v. G. <Mar...@gm...> - 2009-10-20 10:14:34
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I've submitted a patch to the SF patch tracker over two years ago. It hasn't received even a comment yet. cpufreqd has made a number of releases since, the patch was against 2.2.1, and still the issue addressed by the patch remains. http://sourceforge.net/tracker/index.php?func=detail&aid=1766838&group_id=58904&atid=489241 http://bugs.gentoo.org/187581 The break if a CPU_ALL rule does not match breaks only the inner loop, but does not leave the if, so that an ALL rule will always end up just after the inner loop and thus always return MATCH. There are basically two possible solutions; either replace the break by a goto or have the loop counter checked afterwards. I chose the latter for this patch, as many people avoid goto. My patch also fixes a minor issue where negative numbers are printed in some log messages for CPU_ALL and CPU_ANY. Greetings, Martin von Gagern -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkrdjW8ACgkQRhp6o4m9dFucpACghXB/EzoxmO7Gl+LlLFMDp7fT Xg4AnRr/BNGzhHX1c50K0KyRmbons0X+ =/CxO -----END PGP SIGNATURE----- |