aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb
diff options
context:
space:
mode:
Diffstat (limited to 'toys/lsb')
-rw-r--r--toys/lsb/killall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c
index e01757a0..f3d689b3 100644
--- a/toys/lsb/killall.c
+++ b/toys/lsb/killall.c
@@ -72,7 +72,7 @@ void killall_main(void)
return;
}
- if (TT.sig || **TT.names == '-') {
+ if (TT.sig || (*TT.names && **TT.names == '-')) {
if (0 > (TT.signum = sig_to_num(TT.sig ? TT.sig : (*TT.names)+1))) {
if (toys.optflags & FLAG_q) exit(1);
error_exit("Invalid signal");