songvec: _delete() returns void

The given song must exist, or MPD will abort.  Calling it with an
unknown song is illegal.
This commit is contained in:
Max Kellermann 2012-01-24 18:06:25 +01:00
parent 2e5f8aeba1
commit 7e7e3eb8d5
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -36,7 +36,7 @@ void songvec_sort(struct songvec *sv);
struct song *
songvec_find(const struct songvec *sv, const char *uri);
int
void
songvec_delete(struct songvec *sv, const struct song *del);
void