diff options
author | Simon Peeters <peeters.simon@gmail.com> | 2014-01-04 02:35:27 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-01-05 09:16:15 -0500 |
commit | e3e45d4f82daa5cd85ba40dde9127df900096c0c (patch) | |
tree | 307e427adfd64298ff3f21f6c6fd97aca1e17d42 /src/modules-load/modules-load.c | |
parent | bf85c24daaf63f72562bbe4c627ca8b963dfb964 (diff) |
strv: multiple cleanups
- turn strv_merge into strv_extend_strv.
appending strv b to the end of strv a instead of creating a new strv
- strv_append: remove in favor of strv_extend and strv_push.
- strv_remove: write slightly more elegant
- strv_remove_prefix: remove unused function
- strv_overlap: use strv_contains
- strv_printf: STRV_FOREACH handles NULL correctly
Diffstat (limited to 'src/modules-load/modules-load.c')
-rw-r--r-- | src/modules-load/modules-load.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c index 5d141a8935..01987f2e3c 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -64,13 +64,9 @@ static int add_modules(const char *p) { if (!k) return log_oom(); - t = strv_merge(arg_proc_cmdline_modules, k); - if (!t) + if (strv_extend_strv(&arg_proc_cmdline_modules, k) < 0) return log_oom(); - strv_free(arg_proc_cmdline_modules); - arg_proc_cmdline_modules = t; - return 0; } |