Cleanup #20698
open
Constants in code should be replaced with MACRO
Added by Amit Kumar almost 7 years ago.
Updated almost 7 years ago.
Description
I found huge number of constants in code.
In future if we want to change the comparison statement, we need to go to every file and change it.
Macro at common place may be common/config.h would be good.
Doing this for module ceph/src/os
- Tracker changed from Bug to Cleanup
please be specific. in the case of your PR of https://github.com/ceph/ceph/pull/16447, replacing 1 with VAL1 does not help at all.
if 1 is a magic number, for example, which is a sentry of a number sequence. we need to have a better name for it. but in this case, it's not.
Variable name can be changed!!! your suggestions would be good..
But using constant in code ... I believe is no Good..
But using constant in code ... I believe is no Good..
constant in code is not necessary a bad smell.
Also available in: Atom
PDF