summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index d2e5ae91..53e85a6a 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -70,6 +70,15 @@ ea_find(ea_list *e, unsigned id)
return a;
}
+int
+ea_get_int(ea_list *e, unsigned id, int def)
+{
+ eattr *a = ea_find(e, id);
+ if (!a)
+ return def;
+ return a->u.data;
+}
+
static inline void
ea_do_sort(ea_list *e)
{