Skip to contentSkip to conversation

netlink: Align NLA_ALIGNTO with the other ALIGNTO macros

PATCH New Roy Marples 1 participant 1 message Dec 17, 2019 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: Align NLA_ALIGNTO with the other ALIGNTO macros

This avoids sign conversion errors.

include/uapi/linux/netlink.h +1 -1
index 0a4d73317759..c9ed05f14005 100644
@@ -227,7 +227,7 @@ struct nlattr {
 #define NLA_F_NET_BYTEORDER    (1 << 14)
 #define NLA_TYPE_MASK          ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
 
-#define NLA_ALIGNTO            4
+#define NLA_ALIGNTO            4U
 #define NLA_ALIGN(len)         (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
 #define NLA_HDRLEN             ((int) NLA_ALIGN(sizeof(struct nlattr)))