/sound/isa/

value='author'>author
path: root/tc
diff options
context:
space:
mode:
author4!tgraf <4!tgraf>2005-01-18 01:24:18 +0000
committer4!tgraf <4!tgraf>2005-01-18 01:24:18 +0000
commit228569c3ff79468f4c7580fd88b0d6a34ebdc311 (patch)
tree4e19554398028b51514c8f215674cb363aa7c357 /tc
parent60a383ae5f0f8a53db93e474a2b4eb839ef2e214 (diff)
Use NLMSG_TAIL
(Logical change 1.127)
Diffstat (limited to 'tc')
-rw-r--r--tc/f_route.c4
-rw-r--r--tc/f_rsvp.c4
-rw-r--r--tc/m_gact.c5
-rw-r--r--tc/q_atm.c4
-rw-r--r--tc/q_dsmark.c8
-rw-r--r--tc/q_gred.c10
-rw-r--r--tc/q_red.c5
-rw-r--r--tc/q_tbf.c4
8 files changed, 20 insertions, 24 deletions
diff --git a/tc/f_route.c b/tc/f_route.c
index 15c638c8..f3f9bcc4 100644
--- a/tc/f_route.c
+++ b/tc/f_route.c
@@ -54,7 +54,7 @@ static int route_parse_opt(struct filter_util *qu, char *handle, int argc, char
if (argc == 0)
return 0;
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, 4096, TCA_OPTIONS, NULL, 0);
while (argc > 0) {
@@ -125,7 +125,7 @@ static int route_parse_opt(struct filter_util *qu, char *handle, int argc, char
}
argc--; argv++;
}
- tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
if (order) {
fh &= ~0x7F00;
fh |= (order<<8)&0x7F00;
diff --git a/tc/f_rsvp.c b/tc/f_rsvp.c
index 3f33696d..8faa22e7 100644
--- a/tc/f_rsvp.c
+++ b/tc/f_rsvp.c
@@ -189,7 +189,7 @@ static int rsvp_parse_opt(struct filter_util *qu, char *handle, int argc, char *
if (argc == 0)
return 0;
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, 4096, TCA_OPTIONS, NULL, 0);
while (argc > 0) {
@@ -282,7 +282,7 @@ static int rsvp_parse_opt(struct filter_util *qu, char *handle, int argc, char *
if (pinfo_ok)
addattr_l(n, 4096, TCA_RSVP_PINFO, &pinfo, sizeof(pinfo));
- tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}
diff --git a/tc/m_gact.c b/tc/m_gact.c
index f542c788..55cba10d 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -177,7 +177,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struc
if (!ok)
return -1;
- tail = (struct rtattr *) (((void *) n) + NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, MAX_MSG, tca_id, NULL, 0);
addattr_l(n, MAX_MSG, TCA_GACT_PARMS, &p, sizeof (p));
#ifdef CONFIG_GACT_PROB
@@ -185,8 +185,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struc
addattr_l(n, MAX_MSG, TCA_GACT_PROB, &pp, sizeof (pp));
}
#endif
- tail->rta_len =
- (((void *) n) + NLMSG_ALIGN(n->nlmsg_len)) - (void *) tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
*argc_p = argc;
*argv_p = argv;
diff --git a/tc/q_atm.c b/tc/q_atm.c
index bd991a94..ff9d22e6 100644
--- a/tc/q_atm.c
+++ b/tc/q_atm.c