From: Max Kellermann Date: Sat, 14 Nov 2009 01:42:30 +0000 (+0100) Subject: status_bar: moved variable "bitrate" inside closure X-Git-Tag: release-0.16~26 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1e3e68dd6bd0591fce26ed295774063a452b0a6;p=ncmpc.git status_bar: moved variable "bitrate" inside closure --- diff --git a/src/status_bar.c b/src/status_bar.c index 4ccb6e3..2803b28 100644 --- a/src/status_bar.c +++ b/src/status_bar.c @@ -101,11 +101,6 @@ status_bar_paint(struct status_bar *p, const struct mpd_status *status, WINDOW *w = p->window.w; enum mpd_state state; int elapsedTime = 0; -#ifdef NCMPC_MINI - static char bitrate[1]; -#else - char bitrate[16]; -#endif const char *str = NULL; int x = 0; char buffer[p->window.cols * 4 + 1]; @@ -146,6 +141,11 @@ status_bar_paint(struct status_bar *p, const struct mpd_status *status, if (state == MPD_STATE_PLAY || state == MPD_STATE_PAUSE) { int total_time = mpd_status_get_total_time(status); if (total_time > 0) { +#ifdef NCMPC_MINI + static const char bitrate[1]; +#else + char bitrate[16]; +#endif char elapsed_string[32], duration_string[32]; /*checks the conf to see whether to display elapsed or remaining time */