diff options
| author | Tom Tromey <tromey@redhat.com> | 2013-08-19 21:53:07 -0600 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2013-08-19 21:53:07 -0600 |
| commit | 6d75555c5cc3d2a629646cee7629e67530fa7a36 (patch) | |
| tree | 3852804dd234ad613ea8691332e10b92c027e87d /src/regex.c | |
| parent | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (diff) | |
| parent | 8c2f38aaab7a7a2f0605416fc2ee38701e41ab61 (diff) | |
| download | emacs-6d75555c5cc3d2a629646cee7629e67530fa7a36.tar.gz | |
merge from trunk
Diffstat (limited to 'src/regex.c')
| -rw-r--r-- | src/regex.c | 9 |
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 ? ®s : (struct re_registers *) 0); + want_reg_info ? ®s : 0); /* Copy the register information to the POSIX structure. */ if (want_reg_info) |
