summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-04-14 20:15:48 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-04-14 20:15:48 +0000
commit9ffc822d93a68568cc924939d4bb68fddd98a755 (patch)
treea5709ee30c64245104ff61dbf8714e0daf13875d
parentc10ed26f2b4c95cd8727c989fa2173726d579cbf (diff)
turns out more is obsolete now
inspired by diff from Emil Mikulic <emikulic@dmr.ath.cx>
-rw-r--r--sbin/dhclient/alloc.c65
-rw-r--r--sbin/dhclient/dhcpd.h20
2 files changed, 8 insertions, 77 deletions
diff --git a/sbin/dhclient/alloc.c b/sbin/dhclient/alloc.c
index b75c4d25800..ce643ff060e 100644
--- a/sbin/dhclient/alloc.c
+++ b/sbin/dhclient/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.5 2004/02/24 15:35:55 henning Exp $ */
+/* $OpenBSD: alloc.c,v 1.6 2004/04/14 20:15:47 henning Exp $ */
/* Memory allocation... */
@@ -65,14 +65,6 @@ dfree(void *ptr, char *name)
free(ptr);
}
-struct tree *
-new_tree(char *name)
-{
- struct tree *rval = dmalloc(sizeof(struct tree), name);
-
- return (rval);
-}
-
struct string_list *
new_string_list(size_t size, char * name)
{
@@ -84,24 +76,6 @@ new_string_list(size_t size, char * name)
return (rval);
}
-struct tree_cache *free_tree_caches;
-
-struct tree_cache *
-new_tree_cache(char *name)
-{
- struct tree_cache *rval;
-
- if (free_tree_caches) {
- rval = free_tree_caches;
- free_tree_caches = (struct tree_cache *)(rval->value);
- } else {
- rval = dmalloc(sizeof(struct tree_cache), name);
- if (!rval)
- error("unable to allocate tree cache for %s.", name);
- }
- return (rval);
-}
-
struct hash_table *
new_hash_table(int count, char *name)
{
@@ -129,40 +103,3 @@ free_hash_bucket(struct hash_bucket *ptr, char *name)
{
dfree(ptr, name);
}
-
-void
-free_hash_table(struct hash_table *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
-free_tree_cache(struct tree_cache *ptr, char *name)
-{
- ptr->value = (unsigned char *)free_tree_caches;
- free_tree_caches = ptr;
-}
-
-void
-free_packet(struct packet *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
-free_dhcp_packet(struct dhcp_packet *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
-free_tree(struct tree *ptr, char *name)
-{
- dfree(ptr, name);
-}
-
-void
-free_string_list(struct string_list *ptr, char *name)
-{
- dfree(ptr, name);
-}
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h
index 312ed63c7a6..bdde0e508a0 100644
--- a/sbin/dhclient/dhcpd.h
+++ b/sbin/dhclient/dhcpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhcpd.h,v 1.26 2004/03/05 23:57:16 deraadt Exp $ */
+/* $OpenBSD: dhcpd.h,v 1.27 2004/04/14 20:15:47 henning Exp $ */
/*
* Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -290,18 +290,12 @@ struct dns_host_entry *enter_dns_host(char *);
pair cons(caddr_t, pair);
/* alloc.c */
-void *dmalloc(int, char *);
-void dfree(void *, char *);
-struct tree *new_tree(char *);
-struct tree_cache *new_tree_cache(char *);
-struct hash_table *new_hash_table(int, char *);
-struct hash_bucket *new_hash_bucket(char *);
-struct string_list *new_string_list(size_t size, char * name);
-void free_hash_bucket(struct hash_bucket *, char *);
-void free_hash_table(struct hash_table *, char *);
-void free_tree_cache(struct tree_cache *, char *);
-void free_tree(struct tree *, char *);
-void free_string_list(struct string_list *, char *);
+void *dmalloc(int, char *);
+void dfree(void *, char *);
+struct string_list *new_string_list(size_t size, char * name);
+struct hash_table *new_hash_table(int, char *);
+struct hash_bucket *new_hash_bucket(char *);
+void free_hash_bucket(struct hash_bucket *, char *);
/* bpf.c */
int if_register_bpf(struct interface_info *);