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

This commit is contained in:
avg 2015-10-23 08:15:53 +00:00
parent b51c19847a
commit f04b1cd7e1

View File

@ -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;