X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/6465356a983ac139f81d3b7913cdb548477c346c..refs/heads/master:/regex/TRE/lib/tre-match-parallel.c?ds=inline diff --git a/regex/TRE/lib/tre-match-parallel.c b/regex/TRE/lib/tre-match-parallel.c index 67726c4..c6ce76f 100644 --- a/regex/TRE/lib/tre-match-parallel.c +++ b/regex/TRE/lib/tre-match-parallel.c @@ -143,7 +143,7 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len, #endif /* TRE_DEBUG */ tre_tag_t *tmp_tags = NULL; tre_tag_t *tmp_iptr; - int tbytes; + size_t tbytes; int touch = 1; #ifdef TRE_MBSTATE @@ -162,7 +162,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 rbytes, pbytes, total_bytes; + size_t rbytes, pbytes, total_bytes; char *tmp_buf; /* Compute the length of the block we need. */ tbytes = sizeof(*tmp_tags) * num_tags; @@ -177,11 +177,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;