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

Re: [libvirt] [PATCH 1/2] conf: Remove dead code from virConsoleOpen()



On 2012年07月27日 21:44, Peter Krempa wrote:
---
  src/conf/virconsole.c |    6 +-----
  1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/conf/virconsole.c b/src/conf/virconsole.c
index 05e2b07..3d12011 100644
--- a/src/conf/virconsole.c
+++ b/src/conf/virconsole.c
@@ -381,15 +381,11 @@ int virConsoleOpen(virConsolesPtr cons,
      if (virFDStreamOpenFile(st, pty, 0, 0, O_RDWR)<  0)
          goto error;

-    savedStream = st;
-    st = NULL;
-
      /* add cleanup callback */
-    virFDStreamSetInternalCloseCb(savedStream,
+    virFDStreamSetInternalCloseCb(st,
                                    virConsoleFDStreamCloseCb,
                                    cbdata,
                                    virConsoleFDStreamCloseCbFree);
-    cbdata = NULL;

      virMutexUnlock(&cons->lock);
      return 0;

ACK


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