#7 Improve "const correctness"

Version_2.0
open
Kevin Corry
None
5
2006-03-03
2005-07-09
Markus Elfring
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.
- deviceID (function "request_dma")

http://cvs.sourceforge.net/viewcvs.py/evms/runtime/linux-2.4/kernel/ksyms.c?rev=1.8&view=markup

- pool_data (function "mempool_create")

http://cvs.sourceforge.net/viewcvs.py/evms/runtime/linux-2.4/mm/mempool.c?rev=1.2&view=markup

Discussion

  • Kevin Corry
    Kevin Corry
    2006-03-03

    • assigned_to: nobody --> kcorry
     
  • Kevin Corry
    Kevin Corry
    2006-03-03

    Logged In: YES
    user_id=206722

    I've added this to my to-do list, and will try to improve on
    our "const" usage as I do periodic code cleanups.