1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

doc: clarify check for NULL pointer style

Our code should be terse and clear.
This commit is contained in:
Luca Barbato 2012-05-04 10:03:42 -07:00
parent fb5c1aaea6
commit e004bc16a1

View File

@ -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)