Improve "const correctness"
Brought to you by:
mattia-san
Would you like to apply the advices from the article
"http://en.wikipedia.org/wiki/Const_correctness" to
your sources?
I suggest to add the key word "const" to the type
specifiers for parameters like the following.
- freqs (function "normalize_frequency")
http://cvs.sourceforge.net/viewcvs.py/cpufreqd/sources2/src/cpufreq_utils.h?rev=1.3&view=markup
- n (function "list_append")
http://cvs.sourceforge.net/viewcvs.py/cpufreqd/sources2/src/list.c?rev=1.2&view=markup
Do you want to be able to add the same node to
multiple lists so far?
Logged In: YES
user_id=584271
Thanks for the comments, I'll revise the whole code for
const correctness sooner or later, but it's not currently on
top of my todo list :)
I'd really like to release cpufreqd-2 as soon as possible
now in order to let people take advantage of the new features.
Thanks again,
Mattia
Logged In: YES
user_id=572001
Do you notice any difference in the generated object code if
all proposed refactorings will be applied?