aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 48097bc24..2fe84e1ca 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = {
113 [OPTION_IP ] = sizeof("255.255.255.255 "), 113 [OPTION_IP ] = sizeof("255.255.255.255 "),
114 [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, 114 [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2,
115 [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), 115 [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "),
116 [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "), 116 [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "),
117 [OPTION_STRING ] = 1, 117 [OPTION_STRING ] = 1,
118 [OPTION_STRING_HOST ] = 1, 118 [OPTION_STRING_HOST ] = 1,
119#if ENABLE_FEATURE_UDHCP_RFC3397 119#if ENABLE_FEATURE_UDHCP_RFC3397
@@ -222,7 +222,7 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_
222 type = optflag->flags & OPTION_TYPE_MASK; 222 type = optflag->flags & OPTION_TYPE_MASK;
223 optlen = dhcp_option_lengths[type]; 223 optlen = dhcp_option_lengths[type];
224 upper_length = len_of_option_as_string[type] 224 upper_length = len_of_option_as_string[type]
225 * ((unsigned)(len + optlen - 1) / (unsigned)optlen); 225 * ((unsigned)(len + optlen) / (unsigned)optlen);
226 226
227 dest = ret = xmalloc(upper_length + strlen(opt_name) + 2); 227 dest = ret = xmalloc(upper_length + strlen(opt_name) + 2);
228 dest += sprintf(ret, "%s=", opt_name); 228 dest += sprintf(ret, "%s=", opt_name);