Commit f77700aa authored by Matthias Andree's avatar Matthias Andree Committed by Simon Kelley

Fix compiler warning.

parent 0fbd9806
...@@ -834,9 +834,12 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, ...@@ -834,9 +834,12 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
else else
mess->siaddr = context->local; mess->siaddr = context->local;
snprintf((char *)mess->file, sizeof(mess->file), if (strchr(service->basename, '.'))
strchr(service->basename, '.') ? "%s" :"%s.%d", snprintf((char *)mess->file, sizeof(mess->file),
service->basename, layer); "%s.%d", service->basename, layer);
else
snprintf((char *)mess->file, sizeof(mess->file),
"%s", service->basename);
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK); option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr)); option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment