skill: ensure optarg is not null [smatch scan]

skill.c:549 skillsnice_parse(87) error: we previously assumed 'optarg' could be null (see line 539)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-02-05 20:54:58 +01:00
parent ffe5e0b08e
commit 8cd53e16b5

View File

@ -546,7 +546,7 @@ static void skillsnice_parse(int argc,
ENLIST(tty, sbuf.st_rdev);
if (!NEXTARG)
break;
} else if (!(optarg[1])) {
} else if (optarg && !(optarg[1])) {
/* if only 1 character */
switch (*optarg) {
default: