diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-08 19:44:52 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-08-08 20:16:31 +0200 |
commit | a8d3315ba410de0db154516d945b0731656a41d8 (patch) | |
tree | 601382dedfb235754b93234f9f9a48ab70b646ac /src/run-generator/run-generator.c | |
parent | resolve: ignore nameserver= and domain= kernel command line options without v... (diff) | |
download | systemd-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/run-generator/run-generator.c')
-rw-r--r-- | src/run-generator/run-generator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/run-generator/run-generator.c b/src/run-generator/run-generator.c index e3fb7f24fe..dda7c36159 100644 --- a/src/run-generator/run-generator.c +++ b/src/run-generator/run-generator.c @@ -26,7 +26,9 @@ STATIC_DESTRUCTOR_REGISTER(arg_failure_action, freep); static int parse(const char *key, const char *value, void *data) { int r; - if (proc_cmdline_key_streq(key, "systemd.run")) { + assert(key); + + if (streq(key, "systemd.run")) { if (proc_cmdline_value_missing(key, value)) return 0; |