From e1a4474ad4a0bc78ac338223b0528e0161f38e98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Oct 2008 11:06:37 +0200 Subject: song: don't allow calling song_get_url(NULL) The runtime check suggests that the author has somehow thought song_get_url(NULL) might be valid. It should not be. Replace it with an assertion. --- src/song.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/song.c') diff --git a/src/song.c b/src/song.c index bf4be4901..5653e045d 100644 --- a/src/song.c +++ b/src/song.c @@ -121,9 +121,7 @@ song_file_update(struct song *song) char * song_get_url(struct song *song, char *path_max_tmp) { - if (!song) - return NULL; - + assert(song != NULL); assert(*song->url); if (!song->parent || !song->parent->path) -- cgit v1.2.3