From dec9ef200b0d7e96993e2725792a9e7abe9c5f1f Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Fri, 23 Jul 2021 15:27:15 -0400 Subject: openrc-init: ignore an empty string in argv[1] X-Gentoo-Bug: 803536 X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536 Closes: https://github.com/OpenRC/openrc/pull/431 --- src/rc/openrc-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rc/openrc-init.c') diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c index c27e2086..00423746 100644 --- a/src/rc/openrc-init.c +++ b/src/rc/openrc-init.c @@ -263,7 +263,7 @@ int main(int argc, char **argv) printf("OpenRC init version %s starting\n", VERSION); - if (argc > 1) + if (argc > 1 && argv[1][0] != '\0') default_runlevel = argv[1]; else default_runlevel = NULL; -- cgit v1.2.3