diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:06:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-08 11:06:37 +0200 |
commit | e1a4474ad4a0bc78ac338223b0528e0161f38e98 (patch) | |
tree | 86dddab67bc2f103827862bc887e643c54332557 /src/song.c | |
parent | 4ab6b59aaf9db6d6108b0734da2307f7fac7fb4b (diff) | |
download | mpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.tar.gz mpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.tar.xz mpd-e1a4474ad4a0bc78ac338223b0528e0161f38e98.zip |
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.
Diffstat (limited to 'src/song.c')
-rw-r--r-- | src/song.c | 4 |
1 files changed, 1 insertions, 3 deletions
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) |