aboutsummaryrefslogtreecommitdiffstats
path: root/src/songvec.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-01-24 18:06:25 +0100
committerMax Kellermann <max@duempel.org>2012-01-24 18:06:25 +0100
commit7e7e3eb8d5686e11a126128ff43adf34a3ad8f90 (patch)
tree1b268d50cbe1b96457d4b5856ceb9365dc0c701c /src/songvec.c
parent2e5f8aeba138b33a799e00dc0416f3b882150155 (diff)
downloadmpd-7e7e3eb8d5686e11a126128ff43adf34a3ad8f90.tar.gz
mpd-7e7e3eb8d5686e11a126128ff43adf34a3ad8f90.tar.xz
mpd-7e7e3eb8d5686e11a126128ff43adf34a3ad8f90.zip
songvec: _delete() returns void
The given song must exist, or MPD will abort. Calling it with an unknown song is illegal.
Diffstat (limited to '')
-rw-r--r--src/songvec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/songvec.c b/src/songvec.c
index 9c7b30845..5f5b43f08 100644
--- a/src/songvec.c
+++ b/src/songvec.c
@@ -142,7 +142,7 @@ songvec_find(const struct songvec *sv, const char *uri)
return ret;
}
-int
+void
songvec_delete(struct songvec *sv, const struct song *del)
{
size_t i;
@@ -161,11 +161,11 @@ songvec_delete(struct songvec *sv, const struct song *del)
sv->base = g_realloc(sv->base, sv_size(sv));
}
db_unlock();
- return i;
+ return;
}
db_unlock();
- return -1; /* not found */
+ assert(false);
}
void