diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-29 05:33:12 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-29 05:35:49 +0100 |
commit | 61349d3d273aa23935b0c413c5885005db2669db (patch) | |
tree | 9cbc05acb31476d45b48d4a51e9edca19328b8e8 /src/fastd.c | |
parent | c13fe36e4c0730037ae75d51f7f052d916486aac (diff) | |
download | fastd-61349d3d273aa23935b0c413c5885005db2669db.tar fastd-61349d3d273aa23935b0c413c5885005db2669db.zip |
Compile with -std=c99 and restructure some code to ensure there is no invalid aliasing (hopefully)
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fastd.c b/src/fastd.c index 28ff207..03ffc52 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -211,7 +211,7 @@ static void close_sockets(fastd_context_t *ctx) { } static inline void handle_forward(fastd_context_t *ctx, fastd_peer_t *source_peer, fastd_buffer_t buffer) { - const fastd_eth_addr_t *dest_addr = fastd_get_dest_address(ctx, buffer); + fastd_eth_addr_t dest_addr = fastd_get_dest_address(ctx, buffer); if (fastd_eth_addr_is_unicast(dest_addr)) { fastd_peer_t *dest_peer = fastd_peer_find_by_eth_addr(ctx, dest_addr); @@ -236,7 +236,7 @@ void fastd_handle_receive(fastd_context_t *ctx, fastd_peer_t *peer, fastd_buffer return; } - const fastd_eth_addr_t *src_addr = fastd_get_source_address(ctx, buffer); + fastd_eth_addr_t src_addr = fastd_get_source_address(ctx, buffer); if (fastd_eth_addr_is_unicast(src_addr)) fastd_peer_eth_addr_add(ctx, peer, src_addr); @@ -462,7 +462,7 @@ static inline bool handle_tun_tap(fastd_context_t *ctx, fastd_buffer_t buffer) { return true; } - const fastd_eth_addr_t *dest_addr = fastd_get_dest_address(ctx, buffer); + fastd_eth_addr_t dest_addr = fastd_get_dest_address(ctx, buffer); if (!fastd_eth_addr_is_unicast(dest_addr)) return false; |