aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2019-01-20 19:47:33 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2019-01-20 19:47:33 +0000
commit13fe9f7f820d43400912b56aa6745a2b8007a514 (patch)
tree591dd1abd5c61ac96eab77c240a747fea51f5982 /usr.bin
parent4945f79a4c785ca11801808ca1752a68809d0516 (diff)
downloadsrc-13fe9f7f820d43400912b56aa6745a2b8007a514.tar.gz
src-13fe9f7f820d43400912b56aa6745a2b8007a514.zip
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/devs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c
index e6b1e48eb10e..e1c12eacbe74 100644
--- a/usr.bin/systat/devs.c
+++ b/usr.bin/systat/devs.c
@@ -193,6 +193,11 @@ dsmatchselect(const char *args, devstat_select_mode select_mode, int maxshowdevs
int i;
int retval = 0;
+ if (!args) {
+ warnx("dsmatchselect: no arguments");
+ return(0);
+ }
+
/*
* Break the (pipe delimited) input string out into separate
* strings.
@@ -251,6 +256,11 @@ dsselect(const char *args, devstat_select_mode select_mode, int maxshowdevs,
int i;
int retval = 0;
+ if (!args) {
+ warnx("dsselect: no argument");
+ return(1);
+ }
+
/*
* If we've gone through this code before, free previously
* allocated resources.