projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7de80bf
)
analyze: fix seg-fault with no cl-argument
author
Daniel Buch
<boogiewasthere@gmail.com>
Thu, 24 Jul 2014 21:29:40 +0000
(23:29 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sat, 26 Jul 2014 19:08:42 +0000
(15:08 -0400)
We need to check if argv[1] is set before compare
src/analyze/analyze.c
patch
|
blob
|
history
diff --git
a/src/analyze/analyze.c
b/src/analyze/analyze.c
index
66e2aab
..
453ad33
100644
(file)
--- 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);