MFC: if data is NULL, don't pass that to userland as (null)
Approved by: re@ (scottl)
This commit is contained in:
parent
6e436f7dec
commit
0fcbe9db41
@ -553,8 +553,12 @@ devctl_notify(const char *system, const char *subsystem, const char *type,
|
||||
msg = malloc(len, M_BUS, M_NOWAIT);
|
||||
if (msg == NULL)
|
||||
return; /* Drop it on the floor */
|
||||
snprintf(msg, len, "!system=%s subsystem=%s type=%s %s\n", system,
|
||||
subsystem, type, data);
|
||||
if (data != NULL)
|
||||
snprintf(msg, len, "!system=%s subsystem=%s type=%s %s\n",
|
||||
system, subsystem, type, data);
|
||||
else
|
||||
snprintf(msg, len, "!system=%s subsystem=%s type=%s\n",
|
||||
system, subsystem, type);
|
||||
devctl_queue_data(msg);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user