netfilter/ip_tables.h: fix gcc14 error

/home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/net/netfilter/ip_tables.h:281:24: error: returning 'char *' from a function with incompatible return type 'struct xt_entry_target *' [-Wincompatible-pointer-types]
  281 |   return (FAR char *)e + e->target_offset;
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
This commit is contained in:
raiden00pl 2024-05-31 16:01:44 +02:00 committed by Alan Carvalho de Assis
parent 3ce9e34ec9
commit 394de18316

View File

@ -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 */