mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 12:07:03 -06:00
fixed multiple returning when doing mt compressing/decompressing
This commit is contained in:
@@ -313,6 +313,7 @@ static void *pt_compress(void *arg)
|
||||
size_t LZ5MT_compressCCtx(LZ5MT_CCtx * ctx, LZ5MT_RdWr_t * rdwr)
|
||||
{
|
||||
int t;
|
||||
void *retval_of_thread = 0;
|
||||
|
||||
if (!ctx)
|
||||
return ERROR(compressionParameter_unsupported);
|
||||
@@ -335,7 +336,7 @@ size_t LZ5MT_compressCCtx(LZ5MT_CCtx * ctx, LZ5MT_RdWr_t * rdwr)
|
||||
void *p;
|
||||
pthread_join(w->pthread, &p);
|
||||
if (p)
|
||||
return (size_t) p;
|
||||
retval_of_thread = p;
|
||||
}
|
||||
|
||||
/* clean up lists */
|
||||
@@ -349,7 +350,7 @@ size_t LZ5MT_compressCCtx(LZ5MT_CCtx * ctx, LZ5MT_RdWr_t * rdwr)
|
||||
free(wl);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return (size_t)retval_of_thread;
|
||||
}
|
||||
|
||||
/* returns current uncompressed data size */
|
||||
|
||||
Reference in New Issue
Block a user