diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-11 00:35:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-11 00:35:01 +0200 |
commit | f6940be7825755d77ade4cd42231aab9e3580623 (patch) | |
tree | 3d6aff5901e6cafb5df8fe0ba9738d0250a6748f /src/core | |
parent | bafb15bab99887d1b6b8a35136531bac6c3876a6 (diff) |
shutdown: avoid malloc() if we can
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/shutdown.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c index fe7a0739db..10a52bd117 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -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; } |