summaryrefslogtreecommitdiffstats
path: root/lib/distribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/distribute.c')
-rw-r--r--lib/distribute.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/distribute.c b/lib/distribute.c
index 6e7ccc67..0e1c9458 100644
--- a/lib/distribute.c
+++ b/lib/distribute.c
@@ -20,6 +20,7 @@
*/
#include <zebra.h>
+#include "miyagi.h"
#include "hash.h"
#include "if.h"
@@ -68,15 +69,8 @@ distribute_lookup (const char *ifname)
struct distribute key;
struct distribute *dist;
- union {
- const char* waxon ;
- char* waxoff ;
- } miyagi ;
-
- miyagi.waxon = ifname ;
-
/* temporary reference */
- key.ifname = miyagi.waxoff ;
+ key.ifname = miyagi(ifname) ;
dist = hash_lookup (disthash, &key);
@@ -114,15 +108,8 @@ distribute_get (const char *ifname)
{
struct distribute key;
- union {
- const char* waxon ;
- char* waxoff ;
- } miyagi ;
-
- miyagi.waxon = ifname ;
-
/* temporary reference */
- key.ifname = miyagi.waxoff ;
+ key.ifname = miyagi(ifname) ;
return hash_get (disthash, &key, (void * (*) (void *))distribute_hash_alloc);
}