You are right - good catch. While my patch is a common solution it does not apply to all platforms. I'll rework the patch. Thanks. Martin On Tue, Sep 4, 2018 at 9:15 AM David Oberhollenzer <david.oberhollenzer@xxxxxxxxxxxxx> wrote: > > 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/ ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/