aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-05-04 10:03:42 -0700
committerLuca Barbato <lu_zero@gentoo.org>2012-05-06 15:47:10 -0700
commite004bc16a1304822226b5b1ceebdb899d72ee538 (patch)
tree95ae02eabe7f56f83667f6870496a0686b165565
parentfb5c1aaea60a714dab3d4e6e71228855fd816222 (diff)
downloadffmpeg-e004bc16a1304822226b5b1ceebdb899d72ee538.tar.gz
doc: clarify check for NULL pointer style
Our code should be terse and clear.
-rw-r--r--doc/developer.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/developer.texi b/doc/developer.texi
index de642396dc..fed28cdbcd 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -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)