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:
parent
2e5f8aeba1
commit
7e7e3eb8d5
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue