aboutsummaryrefslogtreecommitdiffstats
path: root/src/state_file.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 14:53:29 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 14:53:29 +0100
commit63e240131e30bd77d5203bf29d624a02e04fd421 (patch)
tree050dee4f7fa405ae51e46e9a1366f36626ac14bf /src/state_file.c
parentdcff29e5aa18d8957635553753c4b4ddd730d790 (diff)
downloadmpd-63e240131e30bd77d5203bf29d624a02e04fd421.tar.gz
mpd-63e240131e30bd77d5203bf29d624a02e04fd421.tar.xz
mpd-63e240131e30bd77d5203bf29d624a02e04fd421.zip
state_file: use GLib instead of utils.h / stat()
Diffstat (limited to '')
-rw-r--r--src/state_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/state_file.c b/src/state_file.c
index 7666cc134..e45b6ea94 100644
--- a/src/state_file.c
+++ b/src/state_file.c
@@ -21,11 +21,11 @@
#include "conf.h"
#include "audio.h"
#include "playlist.h"
-#include "utils.h"
#include "volume.h"
#include <glib.h>
#include <string.h>
+#include <errno.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "state_file"
@@ -65,7 +65,7 @@ void write_state_file(void)
return;
}
- for (i = 0; i < ARRAY_SIZE(sf_callbacks); i++)
+ for (i = 0; i < G_N_ELEMENTS(sf_callbacks); i++)
sf_callbacks[i].writer(fp);
while(fclose(fp) && errno == EINTR) /* nothing */;
@@ -86,7 +86,7 @@ void read_state_file(void)
sfpath, strerror(errno));
return;
}
- for (i = 0; i < ARRAY_SIZE(sf_callbacks); i++) {
+ for (i = 0; i < G_N_ELEMENTS(sf_callbacks); i++) {
sf_callbacks[i].reader(fp);
rewind(fp);
}