summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-19 09:49:59 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-19 10:10:57 +0200
commitf3bd4b3df598ce5ea3137b13054ba7cc00714640 (patch)
tree5451b3261c621da8a909d30a1eb38b7cad0dc5e7 /src/portable
parentdc1768131a94d0e123c2e692215628ebce0b01fa (diff)
downloadsystemd-f3bd4b3df598ce5ea3137b13054ba7cc00714640.tar.gz
tree-wide: do not use "re" with fmemopen
The man page says nothing about "e". Glibc clearly accepts it without fuss, but it is meaningless for a memory object (and probably doesn't work). This use is not portable, so let's avoid it.
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/portablectl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c
index 341e70621f..dbae8a4d47 100644
--- a/src/portable/portablectl.c
+++ b/src/portable/portablectl.c
@@ -344,7 +344,7 @@ static int inspect_image(int argc, char *argv[], void *userdata) {
_cleanup_free_ char *pretty_portable = NULL, *pretty_os = NULL;
_cleanup_fclose_ FILE *f = NULL;
- f = fmemopen_unlocked((void*) data, sz, "re");
+ f = fmemopen_unlocked((void*) data, sz, "r");
if (!f)
return log_error_errno(errno, "Failed to open /etc/os-release buffer: %m");
@@ -400,7 +400,7 @@ static int inspect_image(int argc, char *argv[], void *userdata) {
*id = NULL, *version_id = NULL, *sysext_scope = NULL, *portable_prefixes = NULL;
_cleanup_fclose_ FILE *f = NULL;
- f = fmemopen_unlocked((void*) data, sz, "re");
+ f = fmemopen_unlocked((void*) data, sz, "r");
if (!f)
return log_error_errno(errno, "Failed to open extension-release buffer: %m");