projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f42ccd
)
networkctl: fix uninitialized variable
author
Ronny Chevalier
<chevalier.ronny@gmail.com>
Sat, 30 May 2015 08:51:41 +0000
(10:51 +0200)
committer
Ronny Chevalier
<chevalier.ronny@gmail.com>
Sat, 30 May 2015 09:19:36 +0000
(11:19 +0200)
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.
src/network/networkctl.c
patch
|
blob
|
history
diff --git
a/src/network/networkctl.c
b/src/network/networkctl.c
index 69b4ab4a5c6c58ca255dd2687ac63fd8510bee6a..34543949778c67f65704f70fb5d03a13c52c5d09 100644
(file)
--- 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 */