summaryrefslogtreecommitdiffstats
path: root/src/fstab-generator
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-08-08 19:44:52 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-08-08 20:16:31 +0200
commita8d3315ba410de0db154516d945b0731656a41d8 (patch)
tree601382dedfb235754b93234f9f9a48ab70b646ac /src/fstab-generator
parentresolve: ignore nameserver= and domain= kernel command line options without v... (diff)
downloadsystemd-a8d3315ba410de0db154516d945b0731656a41d8.tar.xz
systemd-a8d3315ba410de0db154516d945b0731656a41d8.zip
tree-wise: drop unnecessary use of proc_cmdline_key_streq()
If the key does not contain '-' or '_', then it is not necessary to use proc_cmdline_key_streq(), and streq() is sufficient. This also adds missing assertions about 'key' argument.
Diffstat (limited to 'src/fstab-generator')
-rw-r--r--src/fstab-generator/fstab-generator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 041789673f..c88f5d4b47 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -1355,6 +1355,8 @@ static int add_mounts_from_creds(bool prefix_sysroot) {
static int parse_proc_cmdline_item(const char *key, const char *value, void *data) {
int r;
+ assert(key);
+
/* root=, usr=, usrfstype= and roofstype= may occur more than once, the last
* instance should take precedence. In the case of multiple rootflags=
* or usrflags= the arguments should be concatenated */