From e004bc16a1304822226b5b1ceebdb899d72ee538 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Fri, 4 May 2012 10:03:42 -0700 Subject: doc: clarify check for NULL pointer style Our code should be terse and clear. --- doc/developer.texi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/developer.texi') 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) -- cgit v1.2.3