Skip to contentSkip to conversation

rename members in dummy _xt_align struct

PATCH New Mike Frysinger 1 participant 1 message Jan 29, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rename members in dummy _xt_align struct

i'd like to rename the members in the _xt_align struct in netfilter/x_tables.h ... by not using 'u8', 'u16', etc..., it's possible to filter headers meant for userspace through the preprocessor and pull out people who accidentally utilize these internal types ... however, by using struct members who have the same name as 'u8', 'u16', etc..., this throws up a false positive

of all the exported headers, this is the only one to do this sort of thing, so i hope you guys wont mind making the change :)
-mike

Use diff variable names than the standard type so we can run automated script checks on the code to easily pull out export violations.

include/linux/netfilter/x_tables.h +4 -4
@@ -82,10 +84,10 @@ struct xt_get_revision
  */
 struct _xt_align
 {
-	u_int8_t u8;
-	u_int16_t u16;
-	u_int32_t u32;
-	u_int64_t u64;
+	u_int8_t align_u8;
+	u_int16_t align_u16;
+	u_int32_t align_u32;
+	u_int64_t align_u64;
 };
 
 #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) 	\