From c0100454cf37833d23fdb9d24412de659f683c12 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Wed, 10 May 2000 06:54:40 +0000 Subject: Added more convient interface for ea_find. What is special about int default;? Compiler chokes on that! --- nest/rt-attr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nest/rt-attr.c') 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) { -- cgit v1.2.3