Author: bapt
Date: Fri Dec 11 21:11:02 2015
New Revision: 292122
URL: https://svnweb.freebsd.org/changeset/base/292122

Log:
  Fix sesutil locate when a sesid is passed to locate command

Modified:
  head/usr.sbin/sesutil/sesutil.c

Modified: head/usr.sbin/sesutil/sesutil.c
==============================================================================
--- head/usr.sbin/sesutil/sesutil.c     Fri Dec 11 20:45:39 2015        
(r292121)
+++ head/usr.sbin/sesutil/sesutil.c     Fri Dec 11 21:11:02 2015        
(r292122)
@@ -172,7 +172,7 @@ sesled(int argc, char **argv, bool setfa
        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"));
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to