From: Max Kellermann Date: Tue, 16 Sep 2008 17:11:39 +0000 (+0200) Subject: libmpdclient: const pointers X-Git-Tag: v0.12_alpha1~297 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1f2d9cc479945e1c05021b6547a2665c87e2cafe;p=ncmpc.git libmpdclient: const pointers Pass const pointers whenever possible. --- diff --git a/src/libmpdclient.c b/src/libmpdclient.c index b049844..248d8ea 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -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); diff --git a/src/libmpdclient.h b/src/libmpdclient.h index fe1991e..1f044aa 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -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 */