mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-29 01:50:11 +03:00
util: Fix uninitalized variable to avoid garbage value.
This commit is similar with 692400f4
. It fixes an uninitialized
variable to avoid garbage value. This case, returns 0 jiffies if an
error occurs with virNetDevBridgeGet.
Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
This commit is contained in:
committed by
Michal Privoznik
parent
b97801f39a
commit
596aa144c4
@ -713,7 +713,7 @@ int virNetDevBridgeGetSTPDelay(const char *brname,
|
|||||||
int *delayms)
|
int *delayms)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned long val;
|
unsigned long val = 0;
|
||||||
|
|
||||||
ret = virNetDevBridgeGet(brname, "forward_delay", &val);
|
ret = virNetDevBridgeGet(brname, "forward_delay", &val);
|
||||||
*delayms = JIFFIES_TO_MS(val);
|
*delayms = JIFFIES_TO_MS(val);
|
||||||
|
Reference in New Issue
Block a user