How to tell if a field in c struct is initialized?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I come across this code:
http://elixir.free-electrons.com/linux/latest/source/drivers/scsi/scsi_netlink.c#L128

other fields such as .cbmutex, .bind, etc are not initialized.

Since the object =cfg= is of automatic storage, I wonder how the
kernel tells if a field is initialized or its value is just some
random bits on the stack?

-- 
Best,
Shiyao

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux