summaryrefslogtreecommitdiffstats
path: root/tc/em_meta.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2012-04-10 08:47:55 -0700
committerStephen Hemminger <shemminger@vyatta.com>2012-04-10 08:47:55 -0700
commitff24746cca1ef0c92d46614158e6672acd6b63d3 (patch)
tree05c1317f25238efa48ec7f79cdb82c4044175dbe /tc/em_meta.c
parent49b730d7b237a3c0b2361e77877228199f32cf9c (diff)
Convert to use rta_getattr_ functions
User new functions (inspired by libmnl) to do type safe access of routeing attributes
Diffstat (limited to 'tc/em_meta.c')
-rw-r--r--tc/em_meta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tc/em_meta.c b/tc/em_meta.c
index 033e29f2..fad6b122 100644
--- a/tc/em_meta.c
+++ b/tc/em_meta.c
@@ -448,7 +448,7 @@ static inline int print_value(FILE *fd, int type, struct rtattr *rta)
"size mismatch.\n");
return -1;
}
- fprintf(fd, "%d", *(__u32 *) RTA_DATA(rta));
+ fprintf(fd, "%d", rta_getattr_u32(rta));
break;
case TCF_META_TYPE_VAR:
@@ -485,7 +485,7 @@ static int print_object(FILE *fd, struct tcf_meta_val *obj, struct rtattr *rta)
goto size_mismatch;
fprintf(fd, " mask 0x%08x",
- *(__u32*) RTA_DATA(rta));
+ rta_getattr_u32(rta));
}
break;
}