diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2015-05-30 10:51:41 +0200 |
---|---|---|
committer | Ronny Chevalier <chevalier.ronny@gmail.com> | 2015-05-30 11:19:36 +0200 |
commit | 732b7f39a2b3b1a2af90102c6262186ae71197ac (patch) | |
tree | 2d2b760011c6c6f4c60c74627abd3e1c4dce1803 /src | |
parent | 8f42ccd24ba3cbdb994094df4aac69a00c3c7367 (diff) |
networkctl: fix uninitialized variable
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 69b4ab4a5c..3454394977 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -62,7 +62,7 @@ static int link_get_type_string(int iftype, sd_device *d, char **ret) { 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 */ |