diff options
author | Max Kellermann <max@duempel.org> | 2012-01-21 11:31:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-01-21 11:32:06 +0100 |
commit | 2a6acc04a12e8e0b75108f682b0cf7f5d0546830 (patch) | |
tree | 3124902cc416eec33e3fd8310a0bc97221aed0b5 /src/dirvec.c | |
parent | a46712809363d7cb5337d3aca67e2d06c515ad85 (diff) | |
download | mpd-2a6acc04a12e8e0b75108f682b0cf7f5d0546830.tar.gz mpd-2a6acc04a12e8e0b75108f682b0cf7f5d0546830.tar.xz mpd-2a6acc04a12e8e0b75108f682b0cf7f5d0546830.zip |
dirvec: remove unused functions _clear(), _for_each()
Diffstat (limited to 'src/dirvec.c')
-rw-r--r-- | src/dirvec.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/dirvec.c b/src/dirvec.c index fa6b7b5f6..520a48513 100644 --- a/src/dirvec.c +++ b/src/dirvec.c @@ -113,27 +113,3 @@ void dirvec_destroy(struct dirvec *dv) dv->base = NULL; } } - -int dirvec_for_each(const struct dirvec *dv, - int (*fn)(struct directory *, void *), void *arg) -{ - size_t i; - size_t prev_nr; - - db_lock(); - for (i = 0; i < dv->nr; ) { - struct directory *dir = dv->base[i]; - - assert(dir); - prev_nr = dv->nr; - db_unlock(); - if (fn(dir, arg) < 0) - return -1; - db_lock(); /* dv->nr may change in fn() */ - if (prev_nr == dv->nr) - ++i; - } - db_unlock(); - - return 0; -} |