Author: avg
Date: Fri Oct 23 08:15:53 2015
New Revision: 289809
URL: https://svnweb.freebsd.org/changeset/base/289809

Log:
  MFC r288363: std: it is important that func name is never an empty string

Modified:
  stable/10/sys/cddl/dev/sdt/sdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/dev/sdt/sdt.c
==============================================================================
--- stable/10/sys/cddl/dev/sdt/sdt.c    Fri Oct 23 08:12:43 2015        
(r289808)
+++ stable/10/sys/cddl/dev/sdt/sdt.c    Fri Oct 23 08:15:53 2015        
(r289809)
@@ -169,6 +169,8 @@ sdt_create_probe(struct sdt_probe *probe
         * in the C compiler, so we have to respect const vs non-const.
         */
        strlcpy(func, probe->func, sizeof(func));
+       if (func[0] == '\0')
+               strcpy(func, "none");
 
        from = probe->name;
        to = name;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to