From a0bbaf5bffc66b1693577a374a9a599e313aefe1 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Wed, 30 Apr 2014 17:49:32 +0200 Subject: [PATCH] Fix compiler warning --- src/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/script.c b/src/script.c index 5ddd6c5..13ac562 100644 --- a/src/script.c +++ b/src/script.c @@ -229,8 +229,6 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len { const char *name = (state == STATE_S46_MAPE) ? "MAPE" : (state == STATE_S46_MAPT) ? "MAPT" : "LW4O6"; - const char *type = (state == STATE_S46_MAPE) ? "map-e" : - (state == STATE_S46_MAPT) ? "map-t" : "lw4o6"; char *str; size_t strsize; @@ -240,6 +238,9 @@ static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len fputc('=', fp); #ifdef EXT_S46 + const char *type = (state == STATE_S46_MAPE) ? "map-e" : + (state == STATE_S46_MAPT) ? "map-t" : "lw4o6"; + uint8_t *odata; uint16_t otype, olen; dhcpv6_for_each_option(data, &data[len], otype, olen, odata) { -- 2.25.1