Skip to content

Commit

Permalink
added missing else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
henkmet committed Jun 27, 2024
1 parent 8be5f21 commit 937acc5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dwmbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,15 @@ char *get_mpd() {
title = smprintf("%s", mpd_song_get_uri(song));
}

else {
free(title);
mpd_status_free(status);
mpd_connection_free(con);
return smprintf("Onbekend");
}

if (strcmp(title, "http://streams.greenhost.nl:8080/live") == 0) {
free((char*)title);
title = smprintf("%s", "Concertzender");
title = smprintf("Concertzender");
}

else {
Expand All @@ -130,7 +136,6 @@ char *get_mpd() {
deeltitel = smprintf("%s",token);
token = strtok(NULL,"/");
}
free((char*)title);
title = smprintf("%s %2d:%.2d/%2d:%.2d",
strtok(deeltitel,"."),
elapsed/60, elapsed%60,
Expand Down

0 comments on commit 937acc5

Please sign in to comment.