summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-19 10:47:48 +0200
committerToomas Soome <tsoome@me.com>2019-04-10 09:35:46 +0300
commit1aa5f89221657a92fc85060db4d7cc17b91007e1 (patch)
tree994e3c5ef14c338a8bdf0de554639c254f623a28
parentafac708dc1fa673063127e6091e0f29b33739e9e (diff)
downloadillumos-joyent-1aa5f89221657a92fc85060db4d7cc17b91007e1.tar.gz
10674 profile: NULL pointer errors
Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> Reviewed by: John Levon <john.levon@joyent.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/dtrace/profile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/uts/common/dtrace/profile.c b/usr/src/uts/common/dtrace/profile.c
index 106fb735df..1a6e8d85cc 100644
--- a/usr/src/uts/common/dtrace/profile.c
+++ b/usr/src/uts/common/dtrace/profile.c
@@ -61,7 +61,7 @@ static dtrace_provider_id_t profile_id;
* On SPARC, the picture is further complicated because the compiler
* optimizes away tail-calls -- so the following frames are optimized away:
*
- * profile_fire
+ * profile_fire
* cyclic_expire
*
* This gives three frames. However, on DEBUG kernels, the cyclic_expire
@@ -200,14 +200,14 @@ profile_provide(void *arg, const dtrace_probedesc_t *desc)
} types[] = {
{ PROF_PREFIX_PROFILE, PROF_PROFILE },
{ PROF_PREFIX_TICK, PROF_TICK },
- { NULL, NULL }
+ { NULL, 0 }
};
const struct {
char *name;
hrtime_t mult;
} suffixes[] = {
- { "ns", NANOSEC / NANOSEC },
+ { "ns", NANOSEC / NANOSEC },
{ "nsec", NANOSEC / NANOSEC },
{ "us", NANOSEC / MICROSEC },
{ "usec", NANOSEC / MICROSEC },
@@ -466,7 +466,7 @@ profile_attach(dev_info_t *devi, ddi_attach_cmd_t cmd)
}
if (ddi_create_minor_node(devi, "profile", S_IFCHR, 0,
- DDI_PSEUDO, NULL) == DDI_FAILURE ||
+ DDI_PSEUDO, 0) == DDI_FAILURE ||
dtrace_register("profile", &profile_attr,
DTRACE_PRIV_KERNEL | DTRACE_PRIV_USER, NULL,
&profile_pops, NULL, &profile_id) != 0) {