This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] another small regex cleanup
- From: Paolo Bonzini <paolo dot bonzini at polimi dot it>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 15 Dec 2003 13:07:18 +0100
- Subject: [PATCH] another small regex cleanup
- Reply-to: bonzini at gnu dot org
This cannot harm.
Paolo
2003-12-14 Paolo Bonzini <bonzini@gnu.org>
* libc/regexec.c (check_arrival): remove duplicate test.
--- sed-4.0.9/lib/regexec.c 2003-12-15 12:15:57.000000000 +0100
+++ sed-4.0b/lib/regexec.c 2003-12-15 12:57:39.000000000 +0100
@@ -2819,12 +2819,11 @@ check_arrival
mctx->state_log = backup_state_log;
mctx->input->cur_idx = backup_cur_idx;
- if (cur_nodes == NULL)
- return REG_NOMATCH;
/* Then check the current node set has the node LAST_NODE. */
- return (re_node_set_contains (cur_nodes, last_node)
- || re_node_set_contains (cur_nodes, last_node) ? REG_NOERROR
- : REG_NOMATCH);
+ if (cur_nodes && re_node_set_contains (cur_nodes, last_node))
+ return REG_NOERROR;
+ else
+ return REG_NOMATCH;
}
/* Helper functions for check_arrival. */