struct definition inside a function

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

 



Hi all,
I have not seen a struct define inside a function in kernel code and couldn't find any guidelines if it's permitted or frowned upon?

int fn(int i)
{
 struct my_struct {
int var1;
int var2
}; /* is this allowed? */
struct my_struct struct_local;


return 0;
}
I'll appreciate any insight on this?
--
Thank you
Regards
Anuz
_______________________________________________
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