diff --git a/include/nuttx/net/netfilter/ip_tables.h b/include/nuttx/net/netfilter/ip_tables.h index a8dbac3208..4913df7d65 100644 --- a/include/nuttx/net/netfilter/ip_tables.h +++ b/include/nuttx/net/netfilter/ip_tables.h @@ -278,7 +278,7 @@ struct ipt_get_entries static inline FAR struct xt_entry_target * ipt_get_target(FAR struct ipt_entry *e) { - return (FAR char *)e + e->target_offset; + return (FAR struct xt_entry_target *)((FAR char *)e + e->target_offset); } #endif /* __INCLUDE_NUTTX_NET_NETFILTER_IP_TABLES_H */