mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
client: add null check for adapter proxy
This commit is contained in:
parent
44e9e604f6
commit
cd3d9a26c1
@ -355,12 +355,19 @@ static bool device_unbind_interface(const struct proxy_interface *proxy,
|
|||||||
static void display_device_inline(const char *margin, const void *data)
|
static void display_device_inline(const char *margin, const void *data)
|
||||||
{
|
{
|
||||||
const struct device *device = data;
|
const struct device *device = data;
|
||||||
|
const char *adapter_str;
|
||||||
|
|
||||||
|
if (device->adapter &&
|
||||||
|
proxy_interface_get_identity_str(device->adapter))
|
||||||
|
adapter_str = proxy_interface_get_identity_str(device->adapter);
|
||||||
|
else
|
||||||
|
adapter_str = "-";
|
||||||
|
|
||||||
display("%s%-*s%-*s%-*s%-*s%-*s\n", margin,
|
display("%s%-*s%-*s%-*s%-*s%-*s\n", margin,
|
||||||
20, device->name ? : "",
|
20, device->name ? : "",
|
||||||
20, device->address ? : "",
|
20, device->address ? : "",
|
||||||
15, device->state ? : "",
|
15, device->state ? : "",
|
||||||
10, proxy_interface_get_identity_str(device->adapter) ? : "-",
|
10, adapter_str,
|
||||||
8, device->scanning ? "scanning" : "");
|
8, device->scanning ? "scanning" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user