[FFmpeg-cvslog] doc: clarify check for NULL pointer style

Luca Barbato git at videolan.org
Mon May 7 23:06:23 CEST 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Fri May  4 10:03:42 2012 -0700| [e004bc16a1304822226b5b1ceebdb899d72ee538] | committer: Luca Barbato

doc: clarify check for NULL pointer style

Our code should be terse and clear.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e004bc16a1304822226b5b1ceebdb899d72ee538
---

 doc/developer.texi |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/doc/developer.texi b/doc/developer.texi
index de64239..fed28cd 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
+ at samp{if (!p)} are correct; @samp{if (p == NULL)} and @samp{if (p != NULL)}
+are not.
+ at item
 In case of a single-statement if, no curly braces are required:
 @example
 if (!pic || !picref)



More information about the ffmpeg-cvslog mailing list