projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c390885
)
Remove some warnings
author
Peter Nixon
<listuser@peternixon.net>
Tue, 18 May 2010 18:00:57 +0000
(21:00 +0300)
committer
Peter Nixon
<listuser@peternixon.net>
Tue, 18 May 2010 18:00:57 +0000
(21:00 +0300)
doc/DIFFS.rst
patch
|
blob
|
history
diff --git
a/doc/DIFFS.rst
b/doc/DIFFS.rst
index
1d2cb54
..
1884ca0
100644
(file)
--- a/
doc/DIFFS.rst
+++ b/
doc/DIFFS.rst
@@
-142,7
+142,7
@@
have a really good reason for doing so.
1. Read the Documentation and follow the CodingStyle
The FreeRADIUS server has a common coding style. Use real tabs
1. Read the Documentation and follow the CodingStyle
The FreeRADIUS server has a common coding style. Use real tabs
-
to indent. There is whitespace in variable assignments.
+ to indent. There is whitespace in variable assignments.
(i = 1, NOT i=1).
When in doubt, format your code to look the same as code already
(i = 1, NOT i=1).
When in doubt, format your code to look the same as code already
@@
-158,7
+158,7
@@
have a really good reason for doing so.
are used in the code. Let the compiler optimize away the "no-op"
case.
are used in the code. Let the compiler optimize away the "no-op"
case.
- Simple example, of poor code:
+ Simple example, of poor code:
:
#ifdef CONFIG_MY_FUNKINESS
init_my_stuff(foo);
#ifdef CONFIG_MY_FUNKINESS
init_my_stuff(foo);
@@
-166,17
+166,15
@@
have a really good reason for doing so.
Cleaned-up example:
Cleaned-up example:
- (in header)
+ (in header)
::
#ifndef CONFIG_MY_FUNKINESS
static inline void init_my_stuff(char *foo) {}
#endif
#ifndef CONFIG_MY_FUNKINESS
static inline void init_my_stuff(char *foo) {}
#endif
- (in the code itself)
+ (in the code itself)
::
- ...
init_my_stuff(dev);
init_my_stuff(dev);
- ...
3. 'static inline' is better than a macro
3. 'static inline' is better than a macro