[PATCH 2/3] task-utils: Fix comparison between pointer and integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux