We ignore the return value of sd_device_get_devtype, then devtype could
be uninitialized when used with streq_ptr. So we need to initialize it
first.
assert(ret);
if (iftype == ARPHRD_ETHER && d) {
assert(ret);
if (iftype == ARPHRD_ETHER && d) {
- const char *devtype, *id = NULL;
+ const char *devtype = NULL, *id = NULL;
/* WLANs have iftype ARPHRD_ETHER, but we want
* to show a more useful type string for
* them */
/* WLANs have iftype ARPHRD_ETHER, but we want
* to show a more useful type string for
* them */