Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Rosen Penev <rosenp@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/3] task-utils: Fix comparison between pointer and integer
Date: Mon,  5 Nov 2018 11:06:42 -0800	[thread overview]
Message-ID: <20181105190643.13578-2-rosenp@gmail.com> (raw)
In-Reply-To: <20181105190643.13578-1-rosenp@gmail.com>

pthread_t is a pointer type, not an integer one. The > 0 makes no sense
and throws a warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 task-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/task-utils.c b/task-utils.c
index a9bee8f..e4dcd36 100644
--- a/task-utils.c
+++ b/task-utils.c
@@ -67,7 +67,7 @@ void task_stop(struct task_info *info)
 	if (!info)
 		return;
 
-	if (info->id > 0) {
+	if (info->id) {
 		pthread_cancel(info->id);
 		pthread_join(info->id, NULL);
 		info->id = 0;
-- 
2.19.1


  reply	other threads:[~2018-11-05 19:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 19:06 [PATCH 1/3] bitops: Fix big endian compilation Rosen Penev
2018-11-05 19:06 ` Rosen Penev [this message]
2018-11-05 21:35   ` [PATCH 2/3] task-utils: Fix comparison between pointer and integer Nikolay Borisov
2018-11-05 19:06 ` [PATCH 3/3] treewide: Fix missing declarations Rosen Penev
2018-11-05 21:29   ` Nikolay Borisov
2018-11-05 21:31 ` [PATCH 1/3] bitops: Fix big endian compilation Nikolay Borisov
2018-11-05 21:42   ` Rosen Penev
2018-11-06  6:27     ` Nikolay Borisov
2018-11-13 12:34 ` David Sterba

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=20181105190643.13578-2-rosenp@gmail.com \
    --to=rosenp@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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