Re: [PATCH mtd-utils] ubi-tests: io_paral: Fix error handling of update_volume()

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

 



Hi,

generally, your approach seams reasonable. However there is one small issue with
your patch:

On 08/28/2018 10:31 AM, Martin Lund wrote:
> @@ -302,7 +302,14 @@ int main(int argc, char * const argv[])
>  	}
>  
>  	for (i = 0; i < THREADS_NUM; i++)
> -		pthread_join(threads[i], NULL);
> +	{
> +		pthread_join(threads[i], (void **) &ret);
> +		if (ret != 0)
> +			error = true;
> +	}
> +

"ret" happens to be an integer, you take a pointer to it and cast it to a pointer
to a void*, which receives the result from the thread function.

There are platforms where sizeof(void*) != sizeof(int)

Minor nit pick: the '{' should be on the same line as the for, similar to the rest
of the code.

Thanks,

David

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux