aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-28 19:54:49 +0100
committerMax Kellermann <max@duempel.org>2008-12-28 19:54:49 +0100
commit859aac7242fe3767c19c1bfff73d5e6159cbad31 (patch)
tree2e433f6ec1a820d99ad171ffd6a49a6828ddd0e4 /src/volume.c
parent2598cdd86814c7792a431470a9143d609399697b (diff)
downloadmpd-859aac7242fe3767c19c1bfff73d5e6159cbad31.tar.gz
mpd-859aac7242fe3767c19c1bfff73d5e6159cbad31.tar.xz
mpd-859aac7242fe3767c19c1bfff73d5e6159cbad31.zip
utils: removed myFgets()
Replaced myFgets() with fgets() + g_strchomp().
Diffstat (limited to '')
-rw-r--r--src/volume.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/volume.c b/src/volume.c
index fedccfd7e..2603aeede 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -522,9 +522,11 @@ void read_sw_volume_state(FILE *fp)
if (volume_mixerType != VOLUME_MIXER_TYPE_SOFTWARE)
return;
- while (myFgets(buf, sizeof(buf), fp)) {
+ while (fgets(buf, sizeof(buf), fp)) {
if (!g_str_has_prefix(buf, SW_VOLUME_STATE))
continue;
+
+ g_strchomp(buf);
sv = strtol(buf + strlen(SW_VOLUME_STATE), &end, 10);
if (G_LIKELY(!*end))
changeSoftwareVolume(sv, 0);