From 538c757340eb7a07a8ae26d35570a84e4d59481a Mon Sep 17 00:00:00 2001 From: Nathan Hartman <59230071+hartmannathan@users.noreply.github.com> Date: Sun, 3 Jan 2021 18:00:55 -0500 Subject: [PATCH] apps/examples/webserver: nxstyle fixes apps/examples/webserver/webserver_main.c: * Fix nxstyle errors. --- examples/webserver/webserver_main.c | 41 +++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/examples/webserver/webserver_main.c b/examples/webserver/webserver_main.c index 9d2313f54..022219090 100644 --- a/examples/webserver/webserver_main.c +++ b/examples/webserver/webserver_main.c @@ -110,7 +110,7 @@ int main(int argc, FAR char *argv[]) void *handle; #endif -/* Many embedded network interfaces must have a software assigned MAC */ + /* Many embedded network interfaces must have a software assigned MAC */ #ifdef CONFIG_EXAMPLES_WEBSERVER_NOMAC mac[0] = 0x00; @@ -156,34 +156,35 @@ int main(int argc, FAR char *argv[]) handle = dhcpc_open("eth0", &mac, IFHWADDRLEN); - /* Get an IP address. Note: there is no logic here for renewing the address in this - * example. The address should be renewed in ds.lease_time/2 seconds. + /* Get an IP address. Note: there is no logic here for renewing the + * address in this example. The address should be renewed in + * ds.lease_time/2 seconds. */ printf("Getting IP address\n"); if (handle) { - struct dhcpc_state ds; - dhcpc_request(handle, &ds); - netlib_set_ipv4addr("eth0", &ds.ipaddr); + struct dhcpc_state ds; + dhcpc_request(handle, &ds); + netlib_set_ipv4addr("eth0", &ds.ipaddr); - if (ds.netmask.s_addr != 0) - { - netlib_set_ipv4netmask("eth0", &ds.netmask); - } + if (ds.netmask.s_addr != 0) + { + netlib_set_ipv4netmask("eth0", &ds.netmask); + } - if (ds.default_router.s_addr != 0) - { - netlib_set_dripv4addr("eth0", &ds.default_router); - } + if (ds.default_router.s_addr != 0) + { + netlib_set_dripv4addr("eth0", &ds.default_router); + } - if (ds.dnsaddr.s_addr != 0) - { - netlib_set_ipv4dnsaddr(&ds.dnsaddr); - } + if (ds.dnsaddr.s_addr != 0) + { + netlib_set_ipv4dnsaddr(&ds.dnsaddr); + } - dhcpc_close(handle); - printf("IP: %s\n", inet_ntoa(ds.ipaddr)); + dhcpc_close(handle); + printf("IP: %s\n", inet_ntoa(ds.ipaddr)); } #endif #endif /* CONFIG_NSH_NETINIT */