lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kvm tools: remove unneeded checks in qcow code
Date
We already know q!=NULL at that point, no need to retest.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
tools/kvm/disk/qcow.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c
index ee2992e..64a2550 100644
--- a/tools/kvm/disk/qcow.c
+++ b/tools/kvm/disk/qcow.c
@@ -1361,8 +1361,7 @@ free_header:
if (q->header)
free(q->header);
free_qcow:
- if (q)
- free(q);
+ free(q);

return NULL;
}
@@ -1492,8 +1491,7 @@ free_header:
if (q->header)
free(q->header);
free_qcow:
- if (q)
- free(q);
+ free(q);

return NULL;
}
--
1.8.0


\
 
 \ /
  Last update: 2012-12-20 21:01    [W:0.298 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site