mirror of git://git.sysmocom.de/ofono
coding-style: Don't use hex with shift operator
This commit is contained in:
parent
c70805bdee
commit
b363b8f0cf
|
@ -294,6 +294,18 @@ void foo() // Wrong
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M16: Don't use hex value with shift operators
|
||||||
|
==============================================
|
||||||
|
The expression argument to the shift operators should not be in hex.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
1)
|
||||||
|
1 << y
|
||||||
|
|
||||||
|
2)
|
||||||
|
0x1 << y // Wrong
|
||||||
|
|
||||||
O1: Shorten the name
|
O1: Shorten the name
|
||||||
====================
|
====================
|
||||||
Better to use abbreviation, rather than full name, to name a variable,
|
Better to use abbreviation, rather than full name, to name a variable,
|
||||||
|
|
Loading…
Reference in New Issue