Code

libmpdclient: const pointers
authorMax Kellermann <max@duempel.org>
Tue, 16 Sep 2008 17:11:39 +0000 (19:11 +0200)
committerMax Kellermann <max@duempel.org>
Tue, 16 Sep 2008 17:11:39 +0000 (19:11 +0200)
Pass const pointers whenever possible.

src/libmpdclient.c
src/libmpdclient.h

index b0498445e0adafd997922e17f950835297da4905..248d8ea2f974d1e7ffcd8ea1610ca85114879b04 100644 (file)
@@ -957,7 +957,7 @@ void mpd_freeSong(mpd_Song * song) {
        free(song);
 }
 
-mpd_Song * mpd_songDup(mpd_Song * song) {
+mpd_Song * mpd_songDup(const mpd_Song * song) {
        mpd_Song * ret = mpd_newSong();
 
        if(song->file) ret->file = str_pool_dup(song->file);
index fe1991edc28f1f63d03e991b1e5ba0be8001fb8b..1f044aabba362e7ffeeb707480b64a92389a194b 100644 (file)
@@ -295,7 +295,7 @@ void mpd_freeSong(mpd_Song * song);
 /* mpd_songDup
  * works like strDup, but for a mpd_Song
  */
-mpd_Song * mpd_songDup(mpd_Song * song);
+mpd_Song * mpd_songDup(const mpd_Song * song);
 
 /* DIRECTORY STUFF */