X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmodules-load%2Fmodules-load.c;h=7b19ee02efe43babce3fe9c0ead54d8d81ef07ee;hb=edcfd89ad0996686488c02ee0062d913fa0ba483;hp=9ee260302e123602226ee0beacfd94e8ed79c187;hpb=b56c267ffbd3a5598dfa1dba5e6a51b38fcaed57;p=elogind.git diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c index 9ee260302..7b19ee02e 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -76,7 +76,7 @@ static int add_modules(const char *p) { } static int parse_proc_cmdline(void) { - char _cleanup_free_ *line = NULL; + _cleanup_free_ char *line = NULL; char *w, *state; int r; size_t l; @@ -91,7 +91,7 @@ static int parse_proc_cmdline(void) { } FOREACH_WORD_QUOTED(w, l, line, state) { - char _cleanup_free_ *word; + _cleanup_free_ char *word; word = strndup(w, l); if (!word) @@ -206,7 +206,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent l = strstrip(line); if (!*l) continue; - if (strchr(COMMENTS, *l)) + if (strchr(COMMENTS "\n", *l)) continue; k = load_module(ctx, l);