diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-04-26 20:19:42 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-04-26 20:19:42 +0000 |
commit | dfb974d1ad1ebf2ab16f8a2115253b336bdf0c6a (patch) | |
tree | 702012d1b644ad0d4101419b0b1215ae6497d868 /usr.sbin | |
parent | eaa29a7d4afc53aeda062731550729b6a2b137c5 (diff) |
Remove unused _exists() function. It is not even used in my evil filter tree
so I doubt I will need it anytime soon. Additionally I think that the interface
is dangerous as it bypasses the ref-counting.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/name2id.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/usr.sbin/bgpd/name2id.c b/usr.sbin/bgpd/name2id.c index 66f13a062c8..58e41b42290 100644 --- a/usr.sbin/bgpd/name2id.c +++ b/usr.sbin/bgpd/name2id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: name2id.c,v 1.5 2005/11/02 15:34:43 claudio Exp $ */ +/* $OpenBSD: name2id.c,v 1.6 2006/04/26 20:19:41 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Henning Brauer <henning@openbsd.org> @@ -42,7 +42,6 @@ u_int16_t _name2id(struct n2id_labels *, const char *); const char *_id2name(struct n2id_labels *, u_int16_t); void _unref(struct n2id_labels *, u_int16_t); void _ref(struct n2id_labels *, u_int16_t); -int _exists(struct n2id_labels *, const char *); struct n2id_labels rt_labels = TAILQ_HEAD_INITIALIZER(rt_labels); struct n2id_labels pftable_labels = TAILQ_HEAD_INITIALIZER(pftable_labels); @@ -195,18 +194,3 @@ _ref(struct n2id_labels *head, u_int16_t id) break; } } - -int -_exists(struct n2id_labels *head, const char *name) -{ - struct n2id_label *label; - - if (!name[0]) - return (0); - - TAILQ_FOREACH(label, head, entry) - if (strcmp(name, label->name) == 0) - return (label->id); - - return (0); -} |