On 5.11.18 г. 21:06 ч., Rosen Penev wrote:
> pthread_t is a pointer type, not an integer one. The > 0 makes no sense
> and throws a warning.

Code-wise the patch is ok, however, technically pthread_t is an opaque
type. I guess David could fix it on the way in so no need to resend.

Reviewed-by: Nikolay Borisov <[email protected]>

> 
> Signed-off-by: Rosen Penev <[email protected]>
> ---
>  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;
> 

Reply via email to