summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/fileio.c2
-rw-r--r--src/shared/sleep-config.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index b81eeb272a..0d3f2e90c7 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -130,7 +130,7 @@ ssize_t sendfile_full(int out_fd, const char *fn) {
assert(out_fd > 0);
assert(fn);
- f = fopen(fn, "r");
+ f = fopen(fn, "re");
if (!f)
return -errno;
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 70a0896069..b9b6643066 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -174,7 +174,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
assert(size);
assert(used);
- f = fopen("/proc/swaps", "r");
+ f = fopen("/proc/swaps", "re");
if (!f) {
log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
"Failed to retrieve open /proc/swaps: %m");