aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-07-25 11:09:13 +0200
committerMax Kellermann <max@duempel.org>2010-07-25 12:01:59 +0200
commite4b7a113fded192d2ad31b68a87cf444f206a04e (patch)
treee1babf84c86d89469597058521ee72e48df85dfd /src/database.c
parent7820ebb82ea66619ae72caf3bdeb7fd16d035fdd (diff)
downloadmpd-e4b7a113fded192d2ad31b68a87cf444f206a04e.tar.gz
mpd-e4b7a113fded192d2ad31b68a87cf444f206a04e.tar.xz
mpd-e4b7a113fded192d2ad31b68a87cf444f206a04e.zip
database, ...: remove EINTR checks after stdio calls
MPD doesn't have child processes anymore, and thus we're not expecting to receive SIGCHLD very often. Since hard disk access isn't interrupted by signals anyway, we don't need those excessive checks.
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/database.c b/src/database.c
index 571589118..f255d6ca5 100644
--- a/src/database.c
+++ b/src/database.c
@@ -255,11 +255,11 @@ db_save(void)
if (ferror(fp)) {
g_warning("Failed to write to database file: %s",
strerror(errno));
- while (fclose(fp) && errno == EINTR);
+ fclose(fp);
return false;
}
- while (fclose(fp) && errno == EINTR);
+ fclose(fp);
if (stat(database_path, &st) == 0)
database_mtime = st.st_mtime;
@@ -282,7 +282,7 @@ db_load(GError **error)
assert(database_path != NULL);
assert(music_root != NULL);
- while (!(fp = fopen(database_path, "r")) && errno == EINTR) ;
+ fp = fopen(database_path, "r");
if (fp == NULL) {
g_set_error(error, db_quark(), errno,
"Failed to open database file \"%s\": %s",
@@ -383,7 +383,7 @@ db_load(GError **error)
success = directory_load(fp, music_root, buffer, error);
g_string_free(buffer, true);
- while (fclose(fp) && errno == EINTR) ;
+ fclose(fp);
if (!success)
return false;