diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-09-02 12:37:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-09-02 12:38:49 -0700 |
commit | fda015e7b82a1ec3d1cb075799a67772744ce6c1 (patch) | |
tree | fd24150923a0afb809cfcf063c454b3e1aacdf7a /lib/regex_internal.c | |
parent | 7c37b17b3d6a9be06fa25b19f5eccbc72c52f71c (diff) | |
download | emacs-fda015e7b82a1ec3d1cb075799a67772744ce6c1.tar.gz |
Update from Gnulib
This incorporates:
2019-08-25 intprops.h, verify.h: port better to clang
2019-08-21 New strip-trailing-space option for srclist-update
* .gitattributes: Remove doc/misc/texinfo.tex special case,
which is no longer needed now that Gnulib trims blank-at-eol.
* build-aux/install-sh, doc/misc/texinfo.tex, lib/intprops.h:
* lib/regex_internal.c, lib/verify.h: Copy from Gnulib.
Diffstat (limited to 'lib/regex_internal.c')
-rw-r--r-- | lib/regex_internal.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/regex_internal.c b/lib/regex_internal.c index b592f06725c..0092cc2a468 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -1311,7 +1311,6 @@ re_node_set_insert (re_node_set *set, Idx elem) first element separately to skip a check in the inner loop. */ if (elem < set->elems[0]) { - idx = 0; for (idx = set->nelem; idx > 0; idx--) set->elems[idx] = set->elems[idx - 1]; } @@ -1716,15 +1715,19 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, { if (newstate->entrance_nodes == &newstate->nodes) { - newstate->entrance_nodes = re_malloc (re_node_set, 1); - if (__glibc_unlikely (newstate->entrance_nodes == NULL)) + re_node_set *entrance_nodes = re_malloc (re_node_set, 1); + if (__glibc_unlikely (entrance_nodes == NULL)) { free_state (newstate); return NULL; } + newstate->entrance_nodes = entrance_nodes; if (re_node_set_init_copy (newstate->entrance_nodes, nodes) != REG_NOERROR) - return NULL; + { + free_state (newstate); + return NULL; + } nctx_nodes = 0; newstate->has_constraint = 1; } |