summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-03-19 09:19:14 +0100
committerTobias Klauser <tklauser@distanz.ch>2013-03-19 09:19:14 +0100
commit0a021ca83742e2da23041c3fee602ba861dea6bb (patch)
treede0092335fe79c31f8c33a5b9d96f983a9104074
parent6de434d3af54555bc53b93cca6f99de773142c37 (diff)
flowtop: Omit return value in flow_entry_get_sain{4,6}_obj()
The return value is never used by the callers, so we don't need to return anything. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--flowtop.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/flowtop.c b/flowtop.c
index a8b2fe6..e67859c 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -560,28 +560,24 @@ static inline int flow_entry_get_extended_is_dns(struct flow_entry *n)
#define SELFLD(dir,src_member,dst_member) \
(((dir) == flow_entry_src) ? n->src_member : n->dst_member)
-static struct sockaddr_in *
-flow_entry_get_sain4_obj(struct flow_entry *n, enum flow_entry_direction dir,
- struct sockaddr_in *sa)
+static void flow_entry_get_sain4_obj(struct flow_entry *n,
+ enum flow_entry_direction dir,
+ struct sockaddr_in *sa)
{
memset(sa, 0, sizeof(*sa));
sa->sin_family = PF_INET;
sa->sin_addr.s_addr = htonl(SELFLD(dir, ip4_src_addr, ip4_dst_addr));
-
- return sa;
}
-static struct sockaddr_in6 *
-flow_entry_get_sain6_obj(struct flow_entry *n, enum flow_entry_direction dir,
- struct sockaddr_in6 *sa)
+static void flow_entry_get_sain6_obj(struct flow_entry *n,
+ enum flow_entry_direction dir,
+ struct sockaddr_in6 *sa)
{
memset(sa, 0, sizeof(*sa));
sa->sin6_family = PF_INET6;
memcpy(&sa->sin6_addr, SELFLD(dir, ip6_src_addr, ip6_dst_addr),
sizeof(SELFLD(dir, ip6_src_addr, ip6_dst_addr)));
-
- return sa;
}
static void