mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 19:21:53 +03:00
shutdown: avoid malloc() if we can
This commit is contained in:
parent
bafb15bab9
commit
f6940be782
@ -145,13 +145,7 @@ int main(int argc, char *argv[]) {
|
||||
size_t l;
|
||||
|
||||
FOREACH_WORD_QUOTED(w, l, line, state) {
|
||||
_cleanup_free_ char *word;
|
||||
|
||||
word = strndup(w, l);
|
||||
if (!word)
|
||||
break;
|
||||
|
||||
if (streq(word, "quiet")) {
|
||||
if (l == 5 && memcmp(w, "quiet", 5) == 0) {
|
||||
log_set_max_level(LOG_WARNING);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user