mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-30 07:29:33 +02:00
2024-08-08 Fred Gleason <fredg@paravelsystems.com>
* Added a 'NULL POINTERS' section to 'CODINGSTYLE'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8d80d0cc1b
commit
a5bed2d101
17
CODINGSTYLE
17
CODINGSTYLE
@ -175,6 +175,23 @@ all, followed by an underscore. For example, the class 'MyClass' might use
|
||||
single word.
|
||||
|
||||
|
||||
NULL POINTERS
|
||||
Null pointers should always be represented by using the 'NULL' keyword,
|
||||
rather than 0.
|
||||
|
||||
Good:
|
||||
int *foo=NULL;
|
||||
if(foo==NULL) {
|
||||
printf("The foo variable is null!\n");
|
||||
}
|
||||
|
||||
Bad:
|
||||
int *foo=0;
|
||||
if(foo==0) {
|
||||
printf("The foo variable is null!\n");
|
||||
}
|
||||
|
||||
|
||||
SQL STATEMENTS:
|
||||
When embedding SQL statements in code, the following guidelines should be
|
||||
followed:
|
||||
|
Loading…
x
Reference in New Issue
Block a user