[tables] Incorporate table data type information into table definition
Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
This commit is contained in:
@@ -27,11 +27,11 @@ struct arp_net_protocol {
|
||||
};
|
||||
|
||||
/** ARP protocol table */
|
||||
#define ARP_NET_PROTOCOLS "arp_net_protocols"
|
||||
#define ARP_NET_PROTOCOLS \
|
||||
__table ( struct arp_net_protocol, "arp_net_protocols" )
|
||||
|
||||
/** Declare an ARP protocol */
|
||||
#define __arp_net_protocol \
|
||||
__table ( struct arp_net_protocol, ARP_NET_PROTOCOLS, 01 )
|
||||
#define __arp_net_protocol __table_entry ( ARP_NET_PROTOCOLS, 01 )
|
||||
|
||||
extern struct net_protocol arp_protocol;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user