aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 09:48:28 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 09:48:36 +0200
commitce9aeed4cba059cba4569e101ce93962c3fa2ea5 (patch)
treea5685a2dd37f39e9af3aedcf85f3a71969e7ab13 /src/input
parentf2be6432a9bd7017ade806a74daa91254e128ce4 (diff)
downloadmpd-ce9aeed4cba059cba4569e101ce93962c3fa2ea5.tar.gz
mpd-ce9aeed4cba059cba4569e101ce93962c3fa2ea5.tar.xz
mpd-ce9aeed4cba059cba4569e101ce93962c3fa2ea5.zip
input/file: return NULL instead of "false"
Diffstat (limited to 'src/input')
-rw-r--r--src/input/file_input_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/input/file_input_plugin.c b/src/input/file_input_plugin.c
index dec8f63a3..10b753d24 100644
--- a/src/input/file_input_plugin.c
+++ b/src/input/file_input_plugin.c
@@ -53,7 +53,7 @@ input_file_open(const char *filename, GError **error_r)
struct file_input_stream *fis;
if (!g_path_is_absolute(filename))
- return false;
+ return NULL;
fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);
if (fd < 0) {
@@ -61,7 +61,7 @@ input_file_open(const char *filename, GError **error_r)
g_set_error(error_r, file_quark(), errno,
"Failed to open \"%s\": %s",
filename, g_strerror(errno));
- return false;
+ return NULL;
}
ret = fstat(fd, &st);
@@ -70,14 +70,14 @@ input_file_open(const char *filename, GError **error_r)
"Failed to stat \"%s\": %s",
filename, g_strerror(errno));
close(fd);
- return false;
+ return NULL;
}
if (!S_ISREG(st.st_mode)) {
g_set_error(error_r, file_quark(), 0,
"Not a regular file: %s", filename);
close(fd);
- return false;
+ return NULL;
}
#ifdef POSIX_FADV_SEQUENTIAL