CodingStyle: provide good example

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>, kernel list <linux-kernel@...>
Date: Monday, February 4, 2008 - 7:43 pm

if (!buffer) is actually prefered style, so lets use it in example.

								Pavel

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 6caa146..9bb2d8a 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -406,7 +415,7 @@ int fun(int a)
 	int result = 0;
 	char *buffer = kmalloc(SIZE);
 
-	if (buffer == NULL)
+	if (!buffer)
 		return -ENOMEM;
 
 	if (condition1) {

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CodingStyle: provide good example, Pavel Machek, (Mon Feb 4, 7:43 pm)
Re: CodingStyle: provide good example, Jan Engelhardt, (Mon Feb 4, 8:21 pm)
Re: CodingStyle: provide good example, Andrew Morton, (Mon Feb 4, 7:51 pm)