diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-12 06:40:45 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-12 06:40:45 +0000 |
commit | e16a1b2b114538a160172d8b8347aba1dafb4ed4 (patch) | |
tree | 3b9829a513b620f50fb2acc2ffdcb73fd94ee5aa /sys/net | |
parent | 0d9ed0b375340d0f5b629eaf29a9ca093a2b7082 (diff) |
Remove unneeded art_free().
Reported by and ok jmatthew@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/art.c | 11 | ||||
-rw-r--r-- | sys/net/art.h | 3 |
2 files changed, 3 insertions, 11 deletions
diff --git a/sys/net/art.c b/sys/net/art.c index 83e5e2d9833..62295355b79 100644 --- a/sys/net/art.c +++ b/sys/net/art.c @@ -1,4 +1,4 @@ -/* $OpenBSD: art.c,v 1.12 2016/01/18 18:27:11 mpi Exp $ */ +/* $OpenBSD: art.c,v 1.13 2016/04/12 06:40:44 mpi Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -124,7 +124,7 @@ art_alloc(unsigned int rtableid, unsigned int alen, unsigned int off) break; default: printf("%s: incorrect address length %u\n", __func__, alen); - art_free(ar); + free(ar, M_RTABLE, sizeof(*ar)); return (NULL); } @@ -134,13 +134,6 @@ art_alloc(unsigned int rtableid, unsigned int alen, unsigned int off) return (ar); } -void -art_free(struct art_root *ar) -{ - KASSERT(ar->ar_root == NULL); - free(ar, M_RTABLE, sizeof(*ar)); -} - /* * Return 1 if ``old'' and ``new`` are identical, 0 otherwise. */ diff --git a/sys/net/art.h b/sys/net/art.h index d8c6d2d2f88..a6bfd39d4a0 100644 --- a/sys/net/art.h +++ b/sys/net/art.h @@ -1,4 +1,4 @@ -/* $OpenBSD: art.h,v 1.10 2016/01/18 18:27:12 mpi Exp $ */ +/* $OpenBSD: art.h,v 1.11 2016/04/12 06:40:44 mpi Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -50,7 +50,6 @@ struct art_node { void art_init(void); struct art_root *art_alloc(unsigned int, unsigned int, unsigned int); -void art_free(struct art_root *); struct art_node *art_insert(struct art_root *, struct art_node *, uint8_t *, int); struct art_node *art_delete(struct art_root *, struct art_node *, uint8_t *, |