{
struct List_element *new;
- new = xmalloc (sizeof (struct List_element));
+ new = xmalloc (sizeof *new);
new->next = NULL;
new->type = RE_NORMAL_CHAR;
new->u.normal_char = c;
free (tmp2);
return 1;
}
- new = xmalloc (sizeof (struct List_element));
+ new = xmalloc (sizeof *new);
new->next = NULL;
new->type = RE_RANGE;
new->u.range.first_char = first;
char_class = look_up_char_class (char_class_str, len);
if (char_class == CC_NO_CLASS)
return 1;
- new = xmalloc (sizeof (struct List_element));
+ new = xmalloc (sizeof *new);
new->next = NULL;
new->type = RE_CHAR_CLASS;
new->u.char_class = char_class;
{
struct List_element *new;
- new = xmalloc (sizeof (struct List_element));
+ new = xmalloc (sizeof *new);
new->next = NULL;
new->type = RE_REPEATED_CHAR;
new->u.repeated_char.the_repeated_char = the_char;
if (len != 1)
return 1;
- new = xmalloc (sizeof (struct List_element));
+ new = xmalloc (sizeof *new);
new->next = NULL;
new->type = RE_EQUIV_CLASS;
new->u.equiv_code = *equiv_class_str;
static void
spec_init (struct Spec_list *spec_list)
{
- spec_list->head = spec_list->tail =
- xmalloc (sizeof (struct List_element));
+ struct Spec_list *new = xmalloc (sizeof *new);
+ spec_list->head = spec_list->tail = new;
spec_list->head->next = NULL;
}