Unfamiliar C syntax in HLIST_HEAD_INIT

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

 



While reading the kernel source, I noticed this macro: 

#define HLIST_HEAD_INIT { .first = NULL } 

Which is used to initialize the struct: 

struct hlist_head { 
      struct hlist_node *first; 
}; 

My question is, what is the dot notation in ".first"?  I've never seen it before and couldn't find it in any C programming book I have on hand.  Couldn't this line just as easily be written as

#define HLIST_HEAD_INIT { NULL } 


Thanks, 
Eric

[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