1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

minor cleanup

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@768 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-11-14 05:27:28 +00:00
parent 1efa85889f
commit 57389448a9

View File

@ -127,12 +127,10 @@ void *audacious_thread_func(void *pvoid)
/* Loop until the main thread sets the runnable signal to 0. */
while(runnable) {
for (;;) { /* convenience loop so we can break below */
if (!xmms_remote_is_running (session)) {
memset(&items,0,sizeof(items));
strcpy(items[AUDACIOUS_STATUS],"Not running");
break;
goto next_iter;
}
/* Player status */
@ -195,10 +193,10 @@ void *audacious_thread_func(void *pvoid)
snprintf(items[AUDACIOUS_PLAYLIST_LENGTH],sizeof(items[AUDACIOUS_PLAYLIST_LENGTH])-1, "%d", length);
/* Playlist position (index of song) */
snprintf(items[AUDACIOUS_PLAYLIST_POSITION],sizeof(items[AUDACIOUS_PLAYLIST_POSITION])-1, "%d", playpos+1);
snprintf(items[AUDACIOUS_PLAYLIST_POSITION],sizeof(items[AUDACIOUS_PLAYLIST_POSITION])-1,
"%d", playpos+1);
break;
}
next_iter:
/* Deliver the refreshed items array to audacious_items. */
pthread_mutex_lock(&info.audacious.item_mutex);
@ -215,7 +213,7 @@ void *audacious_thread_func(void *pvoid)
&abstime) != ETIMEDOUT)
{
runnable=0;
(void) pthread_mutex_unlock (&info.audacious.runnable_mutex);
pthread_mutex_unlock (&info.audacious.runnable_mutex);
}
}