summaryrefslogtreecommitdiffstats
path: root/src/shared/nsflags.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-03-03 16:52:40 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-03 21:17:38 +0100
commitdd0395b5654c52e982adf6d354db9c7fdcf4b6c7 (patch)
treea83a6f7757a495b3365bc32a38d0d14df7b28cb4 /src/shared/nsflags.c
parentMerge pull request #15009 from keszybz/version-and-doc-updates (diff)
downloadsystemd-dd0395b5654c52e982adf6d354db9c7fdcf4b6c7.tar.xz
systemd-dd0395b5654c52e982adf6d354db9c7fdcf4b6c7.zip
make namespace_flags_to_string() not return empty string
This improves the following debug log. Before: systemd[1162]: Restricting namespace to: . After: systemd[1162]: Restricting namespace to: n/a.
Diffstat (limited to 'src/shared/nsflags.c')
-rw-r--r--src/shared/nsflags.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/shared/nsflags.c b/src/shared/nsflags.c
index 8cc2d0873d..4dbd18b868 100644
--- a/src/shared/nsflags.c
+++ b/src/shared/nsflags.c
@@ -65,12 +65,6 @@ int namespace_flags_to_string(unsigned long flags, char **ret) {
return -ENOMEM;
}
- if (!s) {
- s = strdup("");
- if (!s)
- return -ENOMEM;
- }
-
*ret = TAKE_PTR(s);
return 0;