History

net: fix *_DIAG_MAX constants

Follow the common pattern and define *_DIAG_MAX like: [...] __XXX_DIAG_MAX, }; Because everyone is used to do: struct nlattr *attrs[XXX_DIAG_MAX+1]; nla_parse([...], XXX_DIAG_MAX, [...]

Andrey Vagin committed 13 years ago

Commit ae5fc981 parent b37391e2 files · +6 −2Browse files

Showing the changes to include/uapi/linux (2 of 2 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/packet_diag.h +3 −1
  2. include/uapi/linux/unix_diag.h +3 −1
include/uapi/linux/packet_diag.h+3−1
@@ -33,9 +33,11 @@ enum { · 32 unmodified lines
3333 PACKET_DIAG_TX_RING,
3434 PACKET_DIAG_FANOUT,
3535
36− PACKET_DIAG_MAX,
36+ __PACKET_DIAG_MAX,
3737 };
3838
39+#define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1)
40+
3941 struct packet_diag_info {
4042 __u32 pdi_index;
4143 __u32 pdi_version;
include/uapi/linux/unix_diag.h+3−1
@@ -39,9 +39,11 @@ enum { · 38 unmodified lines
3939 UNIX_DIAG_MEMINFO,
4040 UNIX_DIAG_SHUTDOWN,
4141
42− UNIX_DIAG_MAX,
42+ __UNIX_DIAG_MAX,
4343 };
4444
45+#define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1)
46+
4547 struct unix_diag_vfs {
4648 __u32 udiag_vfs_ino;
4749 __u32 udiag_vfs_dev;