summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-26 14:48:55 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-27 12:32:47 +0200
commitdfb61dfceaa72dda477a5433a193da316dccef7f (patch)
treea69846b2768006be9e1229f4c8414c21b63cc5cc /nest/rt-attr.c
parent13ef5e53dd4a98c80261139b4c9ce4b1074cac40 (diff)
Fixed undefined attribute handling
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 35f85274..ed3aaf01 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -727,7 +727,7 @@ ea_do_prune(ea_list *e)
/* Now s0 is the most recent version, s[-1] the oldest one */
/* Drop undefs unless this is a true overlay */
- if (s0->undef && !e->next)
+ if (s0->undef && (s[-1].undef || !e->next))
continue;
/* Copy the newest version to destination */
@@ -1081,7 +1081,7 @@ ea_show(struct cli *c, const eattr *e)
*pos++ = ' ';
if (e->undef)
- bsprintf(pos, "undefined (should not happen)");
+ return;
else if (cls->format)
cls->format(e, buf, end - buf);
else