#8 Improve "const correctness"

open
None
5
2005-07-09
2005-07-09
No

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?

Discussion

  • Mattia Dongili

    Mattia Dongili - 2005-07-09
    • assigned_to: nobody --> mattia-san
     
  • Mattia Dongili

    Mattia Dongili - 2005-07-09

    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

     
  • Markus Elfring

    Markus Elfring - 2005-07-22

    Logged In: YES
    user_id=572001

    Do you notice any difference in the generated object code if
    all proposed refactorings will be applied?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks