Fix sesutil locate when a sesid is passed to locate command

This commit is contained in:
Baptiste Daroussin 2015-12-11 21:11:02 +00:00
parent d7654478d3
commit 96e6c444c3
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ sesled(int argc, char **argv, bool setfault)
sesid = strtoul(disk, &endptr, 10); sesid = strtoul(disk, &endptr, 10);
if (*endptr == '\0') { if (*endptr == '\0') {
endptr = strrchr(uflag, '*'); endptr = strrchr(uflag, '*');
if (*endptr == '*') { if (endptr != NULL && *endptr == '*') {
warnx("Must specifying a SES device (-u) to use a SES " warnx("Must specifying a SES device (-u) to use a SES "
"id# to identify a disk"); "id# to identify a disk");
usage(stderr, (setfault ? "fault" : "locate")); usage(stderr, (setfault ? "fault" : "locate"));