[augeas-devel] [PATCH] Remove bad assertions
David Lutterkort
dlutter at redhat.com
Tue May 13 23:06:18 UTC 2008
1 file changed, 3 deletions(-)
src/put.c | 3 ---
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1210719746 25200
# Node ID 7226242d42ab6531f92a8470d69432c19849ad4c
# Parent fb7918bbd1eb96b8954fe483f4614c01b6b55fe8
Remove bad assertions
It is perfectly legal for create_* functions to be called with a non-NULL
skeleton; that happens for example when the union combinator puts a tree
that "jumped branches", i.e. whose get used one branch of the union, and
the put uses the other branch because of changes to the tree.
diff -r fb7918bbd1eb -r 7226242d42ab src/put.c
--- a/src/put.c Tue May 13 11:25:04 2008 -0700
+++ b/src/put.c Tue May 13 16:02:26 2008 -0700
@@ -572,7 +572,6 @@ static void create_union(struct lens *le
static void create_concat(struct lens *lens, struct state *state) {
assert(lens->tag == L_CONCAT);
- assert(state->skel == NULL);
struct split *oldsplit = state->split;
struct split *split = split_concat(state, lens);
@@ -593,7 +592,6 @@ static void create_concat(struct lens *l
static void create_quant_star(struct lens *lens, struct state *state) {
assert(lens->tag == L_STAR);
- assert(state->skel == NULL);
struct split *oldsplit = state->split;
struct split *split = split_iter(lens, state->split);
@@ -611,7 +609,6 @@ static void create_quant_star(struct len
static void create_quant_maybe(struct lens *lens, struct state *state) {
assert(lens->tag == L_MAYBE);
- assert(state->skel == NULL);
if (applies(lens->child, state->split)) {
create_lens(lens->child, state);
More information about the augeas-devel
mailing list