diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-03-01 21:01:21 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-03-01 21:01:21 +0100 |
| commit | 1620ea870db6afd4fa54246cd006eb6f60ab1744 (patch) | |
| tree | c48f6c2f43e16daf54684754802e2aa743165cb2 /src/data.c | |
| parent | 38eb5ec7b286085b505b4cd088c2b9638eb5ae00 (diff) | |
| download | tmus-1620ea870db6afd4fa54246cd006eb6f60ab1744.tar.gz tmus-1620ea870db6afd4fa54246cd006eb6f60ab1744.zip | |
Fixed minor bugs
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -490,6 +490,9 @@ track_rm(struct track *track, bool sync_fs) /* remove from player queue */ link_pop(&track->link_pq); + /* remove from player history */ + link_pop(&track->link_hs); + /* remove the reference as last used track */ if (player.track == track) player.track = NULL; @@ -517,8 +520,8 @@ aquire_lock(const char *datadir) return false; } - fread(linebuf, 1, sizeof(linebuf), file); - pid = atoi(linebuf); + fgets(linebuf, sizeof(linebuf), file); + pid = strtol(linebuf, NULL, 10); procpath = aprintf("/proc/%i", pid); OOM_CHECK(procpath); if (path_exists(procpath)) { |
