diff options
author | Daniel Buch <boogiewasthere@gmail.com> | 2014-07-24 23:29:40 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-26 15:08:42 -0400 |
commit | 5b6f6ebd63a0d212738ee50e9bc357120af6d3ce (patch) | |
tree | ba34c1485a76e87c84218cda4e2bd45b5ed2c6ed /src/analyze/analyze.c | |
parent | 7de80bfe2e61d5818601ccfddbadad3b7703ed70 (diff) | |
download | systemd-5b6f6ebd63a0d212738ee50e9bc357120af6d3ce.tar.gz systemd-5b6f6ebd63a0d212738ee50e9bc357120af6d3ce.tar.bz2 systemd-5b6f6ebd63a0d212738ee50e9bc357120af6d3ce.zip |
analyze: fix seg-fault with no cl-argument
We need to check if argv[1] is set before compare
Diffstat (limited to 'src/analyze/analyze.c')
-rw-r--r-- | src/analyze/analyze.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 66e2aabe96..453ad335a1 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1349,7 +1349,7 @@ int main(int argc, char *argv[]) { if (r <= 0) goto finish; - if (streq(argv[optind], "verify")) + if (streq_ptr(argv[optind], "verify")) r = verify_units(argv+optind+1, arg_user ? SYSTEMD_USER : SYSTEMD_SYSTEM, arg_man); |