mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
modules: bzero the modspecific_t
Per https://reviews.llvm.org/D68115, only the first field is
zero-initialized, meanwhile other fields are undef.
The pattern can be observed on clang as well, that when
-ftrivial-auto-var-init=pattern is specified 0xaa is filled for
non-active fields, otherwise they are zero-initialized.
Technically both are acceptable when using clang. However it
would be good to simply bzero the modspecific_t in such case to
be strict to the standard.
MFC with: 2cab2d43b8
MFC after: 1 day
Sponsored by: Juniper Networks, Inc.
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D40830
This commit is contained in:
parent
84deca4d8c
commit
005aa1743b
1 changed files with 2 additions and 1 deletions
|
|
@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod,
|
|||
int what, void *arg)
|
||||
{
|
||||
struct syscall_module_data *data = arg;
|
||||
modspecific_t ms = { 0 };
|
||||
modspecific_t ms;
|
||||
int error;
|
||||
|
||||
bzero(&ms, sizeof(ms));
|
||||
switch (what) {
|
||||
case MOD_LOAD:
|
||||
error = kern_syscall_register(sysents, data->offset,
|
||||
|
|
|
|||
Loading…
Reference in a new issue