diff --git a/lib/tre-match-parallel.c b/lib/tre-match-parallel.c index 049b21a..cc310d8 100644 --- a/lib/tre-match-parallel.c +++ b/lib/tre-match-parallel.c @@ -152,7 +152,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, everything in a single large block from the stack frame using alloca() or with malloc() if alloca is unavailable. */ { - int tbytes, rbytes, pbytes, xbytes, total_bytes; + size_t tbytes, rbytes, pbytes, xbytes, total_bytes; char *tmp_buf; /* Compute the length of the block we need. */ tbytes = sizeof(*tmp_tags) * num_tags; @@ -167,11 +167,11 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, #ifdef TRE_USE_ALLOCA buf = alloca(total_bytes); #else /* !TRE_USE_ALLOCA */ - buf = xmalloc((unsigned)total_bytes); + buf = xmalloc(total_bytes); #endif /* !TRE_USE_ALLOCA */ if (buf == NULL) return REG_ESPACE; - memset(buf, 0, (size_t)total_bytes); + memset(buf, 0, total_bytes); /* Get the various pointers within tmp_buf (properly aligned). */ tmp_tags = (void *)buf;