eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit f046bed225e0e9efad3103a4f761ec5956455df2
parent 0ae3e1c59d2ac9bad46eab332920108e4d2de255
Author: James Prestwood <prestwoj@gmail.com>
Date:   Mon,  8 Feb 2021 12:19:58 -0800

ap: massage code to make static analysis happy

There is no functional change here but checking the return
value makes static analysis much happier. Checking the
return and setting the default inside the if clause is also
consistent with how IWD does it many other places.

Diffstat:
Msrc/ap.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/ap.c b/src/ap.c @@ -3305,7 +3305,7 @@ static void ap_netdev_watch(struct netdev *netdev, static int ap_init(void) { const struct l_settings *settings = iwd_get_config(); - bool dhcp_enable = false; + bool dhcp_enable; netdev_watch = netdev_watch_add(ap_netdev_watch, NULL, NULL); @@ -3320,8 +3320,9 @@ static int ap_init(void) * DHCP server. If no value is found or it is false do not create a * DHCP server. */ - l_settings_get_bool(settings, "General", "EnableNetworkConfiguration", - &dhcp_enable); + if (!l_settings_get_bool(settings, "General", + "EnableNetworkConfiguration", &dhcp_enable)) + dhcp_enable = false; if (dhcp_enable) { L_AUTO_FREE_VAR(char *, ip_prefix);