From: Max Kellermann Date: Thu, 2 Oct 2008 13:20:18 +0000 (+0200) Subject: strfsong: constant pointers X-Git-Tag: v0.12_alpha1~122 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=38fdf10851fae4204b0be424c0b79ee9271033b2;p=ncmpc.git strfsong: constant pointers Pass constant pointers to strfsong() and screen_lyrics_load(). --- diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index ec552ee..dbfe4ea 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -164,7 +164,7 @@ screen_lyrics_callback(const GString *result, mpd_unused void *data) } static void -screen_lyrics_load(struct mpd_song *song) +screen_lyrics_load(const struct mpd_song *song) { char buffer[MAX_SONGNAME_LENGTH]; diff --git a/src/strfsong.c b/src/strfsong.c index 523c30d..f6b6793 100644 --- a/src/strfsong.c +++ b/src/strfsong.c @@ -54,7 +54,7 @@ static gsize _strfsong(gchar *s, gsize max, const gchar *format, - mpd_Song *song, + const struct mpd_song *song, const gchar **last) { const gchar *p, *end; @@ -216,7 +216,8 @@ _strfsong(gchar *s, } gsize -strfsong(gchar *s, gsize max, const gchar *format, mpd_Song *song) +strfsong(gchar *s, gsize max, const gchar *format, + const struct mpd_song *song) { return _strfsong(s, max, format, song, NULL); } diff --git a/src/strfsong.h b/src/strfsong.h index 7c0361d..7770a86 100644 --- a/src/strfsong.h +++ b/src/strfsong.h @@ -4,6 +4,7 @@ #include #include "libmpdclient.h" -gsize strfsong(gchar *s, gsize max, const gchar *format, mpd_Song *song); +gsize strfsong(gchar *s, gsize max, const gchar *format, + const struct mpd_song *song); #endif