Commit e004bc16 authored by Luca Barbato's avatar Luca Barbato

doc: clarify check for NULL pointer style

Our code should be terse and clear.
parent fb5c1aae
......@@ -73,6 +73,10 @@ const char *avfilter_configuration(void)
@}
@end example
@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:
@example
if (!pic || !picref)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment