mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@mail.ru>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] futex: s/0/NULL/ in pointer context
Date: Sun, 9 Jan 2005 11:23:31 +0200	[thread overview]
Message-ID: <200501091123.31402.adobriyan@mail.ru> (raw)

Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru>

Index: linux-2.6.10-bk11-warnings/kernel/futex.c
===================================================================
--- linux-2.6.10-bk11-warnings/kernel/futex.c	(revision 4)
+++ linux-2.6.10-bk11-warnings/kernel/futex.c	(revision 5)
@@ -236,7 +236,7 @@
  */
 static inline void get_key_refs(union futex_key *key)
 {
-	if (key->both.ptr != 0) {
+	if (key->both.ptr != NULL) {
 		if (key->both.offset & 1)
 			atomic_inc(&key->shared.inode->i_count);
 		else
@@ -250,7 +250,7 @@
  */
 static void drop_key_refs(union futex_key *key)
 {
-	if (key->both.ptr != 0) {
+	if (key->both.ptr != NULL) {
 		if (key->both.offset & 1)
 			iput(key->shared.inode);
 		else
@@ -445,7 +445,7 @@
 	/* In the common case we don't take the spinlock, which is nice. */
  retry:
 	lock_ptr = q->lock_ptr;
-	if (lock_ptr != 0) {
+	if (lock_ptr != NULL) {
 		spin_lock(lock_ptr);
 		/*
 		 * q->lock_ptr can change between reading it and

             reply	other threads:[~2005-01-09  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09  9:23 Alexey Dobriyan [this message]
2005-01-09 14:19 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501091123.31402.adobriyan@mail.ru \
    --to=adobriyan@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome