From: Steven Barth Date: Wed, 30 Apr 2014 15:49:32 +0000 (+0200) Subject: Fix compiler warning X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a0bbaf5bffc66b1693577a374a9a599e313aefe1;p=oweals%2Fodhcp6c.git Fix compiler warning --- 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) {