From ff24746cca1ef0c92d46614158e6672acd6b63d3 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 10 Apr 2012 08:47:55 -0700 Subject: Convert to use rta_getattr_ functions User new functions (inspired by libmnl) to do type safe access of routeing attributes --- tc/em_meta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tc/em_meta.c') 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; } -- cgit v1.2.3