On Thu, Jul 24, 2014 at 11:29:40PM +0200, Daniel Buch wrote:
> We need to check if argv[1] is set before compare
> ---
>  src/analyze/analyze.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
> index 66e2aab..83da7f5 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 (argv[optind] && streq(argv[optind], "verify"))
>                  r = verify_units(argv+optind+1,
>                                   arg_user ? SYSTEMD_USER : SYSTEMD_SYSTEM,
>                                   arg_man);
Applied, with a change to use streq_ptr().

Zbyszek
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to