summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-19 21:53:07 -0600
committerTom Tromey <tromey@redhat.com>2013-08-19 21:53:07 -0600
commit6d75555c5cc3d2a629646cee7629e67530fa7a36 (patch)
tree3852804dd234ad613ea8691332e10b92c027e87d /src/regex.c
parentcc231cbe45d27a1906d268fb72d3b4105a2e9c65 (diff)
parent8c2f38aaab7a7a2f0605416fc2ee38701e41ab61 (diff)
downloademacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.tar.gz
merge from trunk
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/regex.c b/src/regex.c
index 5024f748884..75661a27892 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -468,7 +468,7 @@ init_syntax_once (void)
/* 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. */
@@ -4212,7 +4212,7 @@ re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, uns
{
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)
@@ -6393,8 +6393,7 @@ weak_function
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 */
@@ -6558,7 +6557,7 @@ regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
/* Perform the searching operation. */
ret = re_search (&private_preg, string, len,
/* start: */ 0, /* range: */ len,
- want_reg_info ? &regs : (struct re_registers *) 0);
+ want_reg_info ? &regs : 0);
/* Copy the register information to the POSIX structure. */
if (want_reg_info)