diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-13 21:54:02 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-13 21:54:02 -0700 |
commit | 396f03db551d585ee3eff4a3a1e6f49283abbc61 (patch) | |
tree | e5566191b76c19e50222e41d7a835e0652a9b2be /src/dirvec.c | |
parent | e5c604feac962f654ba2cb7739ef33b9242cb072 (diff) | |
download | mpd-396f03db551d585ee3eff4a3a1e6f49283abbc61.tar.gz mpd-396f03db551d585ee3eff4a3a1e6f49283abbc61.tar.xz mpd-396f03db551d585ee3eff4a3a1e6f49283abbc61.zip |
{dir,song}vec: remove unused *_destroy routines
Blindly destroying these without freeing the underlying
elements was a bad idea, always. Our iterators suck
less nowadays and we can traverse them and free() each
element safely.
Diffstat (limited to '')
-rw-r--r-- | src/dirvec.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/dirvec.c b/src/dirvec.c index cb695ac5d..f845c9973 100644 --- a/src/dirvec.c +++ b/src/dirvec.c @@ -74,17 +74,6 @@ void dirvec_add(struct dirvec *dv, struct directory *add) pthread_mutex_unlock(&nr_lock); } -void dirvec_destroy(struct dirvec *dv) -{ - pthread_mutex_lock(&nr_lock); - dv->nr = 0; - pthread_mutex_unlock(&nr_lock); - if (dv->base) { - free(dv->base); - dv->base = NULL; - } -} - int dirvec_for_each(const struct dirvec *dv, int (*fn)(struct directory *, void *), void *arg) { |