/* Assumes a `char *destination' variable. */
# define REGEX_REALLOCATE(source, osize, nsize) \
- (destination = (char *) alloca (nsize), \
+ (destination = alloca (nsize), \
memcpy (destination, source, osize))
/* No need to do anything to free, after alloca. */
{
bufp->regs_allocated = REGS_UNALLOCATED;
regs->num_regs = 0;
- regs->start = regs->end = (regoff_t *) 0;
+ regs->start = regs->end = 0;
}
}
WEAK_ALIAS (__re_set_registers, re_set_registers)
re_exec (const char *s)
{
const size_t len = strlen (s);
- return (re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0)
- >= 0);
+ return re_search (&re_comp_buf, s, len, 0, len, 0) >= 0;
}
#endif /* _REGEX_RE_COMP */
\f
/* Perform the searching operation. */
ret = re_search (&private_preg, string, len,
/* start: */ 0, /* range: */ len,
- want_reg_info ? ®s : (struct re_registers *) 0);
+ want_reg_info ? ®s : 0);
/* Copy the register information to the POSIX structure. */
if (want_reg_info)