summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sesutil
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-12-11 21:11:02 +0000
committerbapt <bapt@FreeBSD.org>2015-12-11 21:11:02 +0000
commit662efc558a6dacbc0d61880c94f33976bff9481e (patch)
tree41f8418f35d8c1fcf784345bb5c310a3f978a642 /usr.sbin/sesutil
parente149088043e6c1193382e2af3cf0609faf851310 (diff)
downloadFreeBSD-src-662efc558a6dacbc0d61880c94f33976bff9481e.zip
FreeBSD-src-662efc558a6dacbc0d61880c94f33976bff9481e.tar.gz
Fix sesutil locate when a sesid is passed to locate command
Diffstat (limited to 'usr.sbin/sesutil')
-rw-r--r--usr.sbin/sesutil/sesutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/sesutil/sesutil.c b/usr.sbin/sesutil/sesutil.c
index 2f2b529..5c96070 100644
--- a/usr.sbin/sesutil/sesutil.c
+++ b/usr.sbin/sesutil/sesutil.c
@@ -172,7 +172,7 @@ sesled(int argc, char **argv, bool setfault)
sesid = strtoul(disk, &endptr, 10);
if (*endptr == '\0') {
endptr = strrchr(uflag, '*');
- if (*endptr == '*') {
+ if (endptr != NULL && *endptr == '*') {
warnx("Must specifying a SES device (-u) to use a SES "
"id# to identify a disk");
usage(stderr, (setfault ? "fault" : "locate"));
OpenPOWER on IntegriCloud