Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/tre-compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ tre_compute_npfl(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *tree,
if (status != REG_OK)
return status;
/* Allocate arrays for the tags and parameters. */
tags = xmalloc(sizeof(int) * (num_tags + 1));
tags = xmalloc(sizeof(*tags) * (num_tags + 1));
if (!tags)
return REG_ESPACE;
tags[0] = -1;
Expand Down Expand Up @@ -1938,8 +1938,8 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags)
memset(tag_directions, -1,
sizeof(*tag_directions) * (tnfa->num_tags + 1));
}
tnfa->minimal_tags = xcalloc((unsigned)tnfa->num_tags * 2 + 1,
sizeof(tnfa->minimal_tags));
tnfa->minimal_tags = xcalloc(tnfa->num_tags * 2 + 1,
sizeof(*tnfa->minimal_tags));
if (tnfa->minimal_tags == NULL)
ERROR_EXIT(REG_ESPACE);

Expand Down
2 changes: 1 addition & 1 deletion local_includes/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

*/

#ifndef TRE_REXEX_H
#ifndef TRE_REGEX_H
#define TRE_REGEX_H 1

#ifdef USE_LOCAL_TRE_H
Expand Down
Loading