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(a)gmail.com>
---
src/util/virnetdevbridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c
index 0f301d9216..4f21a82fb7 100644
--- a/src/util/virnetdevbridge.c
+++ b/src/util/virnetdevbridge.c
@@ -713,7 +713,7 @@ int virNetDevBridgeGetSTPDelay(const char *brname,
int *delayms)
{
int ret = -1;
- unsigned long val;
+ unsigned long val = 0;
ret = virNetDevBridgeGet(brname, "forward_delay", &val);
*delayms = JIFFIES_TO_MS(val);
--
2.20.1