aboutsummaryrefslogtreecommitdiff
path: root/io/channel-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/channel-file.c')
-rw-r--r--io/channel-file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/io/channel-file.c b/io/channel-file.c
index b383273201..16bf7ed270 100644
--- a/io/channel-file.c
+++ b/io/channel-file.c
@@ -50,11 +50,7 @@ qio_channel_file_new_path(const char *path,
ioc = QIO_CHANNEL_FILE(object_new(TYPE_QIO_CHANNEL_FILE));
- if (flags & O_WRONLY) {
- ioc->fd = open(path, flags, mode);
- } else {
- ioc->fd = open(path, flags);
- }
+ ioc->fd = open(path, flags, mode);
if (ioc->fd < 0) {
object_unref(OBJECT(ioc));
error_setg_errno(errp, errno,