[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] openvz_driver.c: avoid dead store to "err"




>From 559c1ba31a89fd3a6ed54631d5d900fa16140187 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Fri, 4 Sep 2009 19:11:31 +0200
Subject: [PATCH] openvz_driver.c: avoid dead store to "err"

* src/openvz_driver.c (openvzGenerateContainerVethName): Remove use
and decl of "err".
---
 src/openvz_driver.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/openvz_driver.c b/src/openvz_driver.c
index 43d54f9..a8c24ba 100644
--- a/src/openvz_driver.c
+++ b/src/openvz_driver.c
@@ -504,11 +504,10 @@ openvzGenerateVethName(int veid, char *dev_name_ve)
 static char *
 openvzGenerateContainerVethName(int veid)
 {
-    int     ret;
     char    temp[1024];

     /* try to get line "^NETIF=..." from config */
-    if ( (ret = openvzReadVPSConfigParam(veid, "NETIF", temp, sizeof(temp))) <= 0) {
+    if (openvzReadVPSConfigParam(veid, "NETIF", temp, sizeof(temp)) <= 0) {
         snprintf(temp, sizeof(temp), "eth0");
     } else {
         char *saveptr;
--
1.6.4.2.409.g85dc3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]