forked from FFmpeg/FFmpeg
doc: clarify check for NULL pointer style
Our code should be terse and clear.
This commit is contained in:
parent
fb5c1aaea6
commit
e004bc16a1
1 changed files with 4 additions and 0 deletions
|
@ -73,6 +73,10 @@ const char *avfilter_configuration(void)
|
||||||
@}
|
@}
|
||||||
@end example
|
@end example
|
||||||
@item
|
@item
|
||||||
|
Do not check for NULL values by comparison, @samp{if (p)} and
|
||||||
|
@samp{if (!p)} are correct; @samp{if (p == NULL)} and @samp{if (p != NULL)}
|
||||||
|
are not.
|
||||||
|
@item
|
||||||
In case of a single-statement if, no curly braces are required:
|
In case of a single-statement if, no curly braces are required:
|
||||||
@example
|
@example
|
||||||
if (!pic || !picref)
|
if (!pic || !picref)
|
||||||
|
|
Loading…
Add table
Reference in a new issue