Menu

#21 Improve "const correctness"

Next_Release
open
nobody
None
5
2005-07-19
2005-07-19
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.
- device_name (function "cl_open_device")

http://infiniband.bkbits.net:8080/iba/diffs/base/linux/include/iba/complib/cl_device.h@1.1

- p_shell_command (function "cl_user_mode_helper")

http://infiniband.bkbits.net:8080/iba/diffs/base/linux/include/iba/complib/cl_system.h@1.1

- s (functions "str.+")

http://infiniband.bkbits.net:8080/iba/diffs/base/linux/hca/mellanox/include/strlib.h@1.1

- p_protosw, p_laddr, p_raddr (function "op_addr_match")

http://infiniband.bkbits.net:8080/iba/diffs/base/linux/net/ops/offload.h@1.1

Are there any candidates for correction left in other
files?

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.