summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-06 12:05:26 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-30 16:46:09 +0100
commit2987225ce6c3800821fe71e1ad5a698785ca54a3 (patch)
tree146d5e5dd92a2704d6669e5743993813915a4fa6
parentanalyze: remove unnecessary negation of bus_error_message() error number para... (diff)
downloadsystemd-2987225ce6c3800821fe71e1ad5a698785ca54a3.tar.xz
systemd-2987225ce6c3800821fe71e1ad5a698785ca54a3.zip
analyze: use strv_skip() where appropriate
-rw-r--r--src/analyze/analyze.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 446b4432ee..02c9c13204 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -1340,15 +1340,16 @@ static int dump(int argc, char *argv[], void *userdata) {
}
static int cat_config(int argc, char *argv[], void *userdata) {
- char **arg;
+ char **arg, **list;
int r;
(void) pager_open(arg_pager_flags);
- STRV_FOREACH(arg, argv + 1) {
+ list = strv_skip(argv, 1);
+ STRV_FOREACH(arg, list) {
const char *t = NULL;
- if (arg != argv + 1)
+ if (arg != list)
print_separator();
if (path_is_absolute(*arg)) {