neigh: use NEIGH_VAR_INIT in ndo_neigh_setup functions.
[deliverable/linux.git] / include / net / neighbour.h
index 4c09bd23b8329bd2abad4c6e317d54ebba92d8bb..7277caf3743d269b8e547178c3ae7f58fbbd28e0 100644 (file)
@@ -92,6 +92,11 @@ static inline void neigh_var_set(struct neigh_parms *p, int index, int val)
 }
 
 #define NEIGH_VAR(p, attr) ((p)->data[NEIGH_VAR_ ## attr])
+
+/* In ndo_neigh_setup, NEIGH_VAR_INIT should be used.
+ * In other cases, NEIGH_VAR_SET should be used.
+ */
+#define NEIGH_VAR_INIT(p, attr, val) (NEIGH_VAR(p, attr) = val)
 #define NEIGH_VAR_SET(p, attr, val) neigh_var_set(p, NEIGH_VAR_ ## attr, val)
 
 static inline void neigh_parms_data_state_setall(struct neigh_parms *p)
This page took 0.025481 seconds and 5 git commands to generate.