All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 1/2] qcow2-snapshot: Change filter function to avoid NULL parameter when a snapshot will be created.
@ 2015-01-23  1:53 ` Julio Faracco
  0 siblings, 0 replies; 8+ messages in thread
From: Julio Faracco @ 2015-01-23  1:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, kwolf, Julio Faracco

This is a trivial patch to change the filter 'find_snapshot_by_id_and_name'
to 'find_snapshot_by_id_or_name'. The field 'Name' is not required. So this
change avoid NULL parameters. And use the correct function to filter.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 block/qcow2-snapshot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 5b3903c..c7d4cfe 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -357,7 +357,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
     }
 
     /* Check that the ID is unique */
-    if (find_snapshot_by_id_and_name(bs, sn_info->id_str, NULL) >= 0) {
+    if (find_snapshot_by_id_or_name(bs, sn_info->id_str) >= 0) {
         return -EEXIST;
     }
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-27 18:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23  1:53 [Qemu-trivial] [PATCH 1/2] qcow2-snapshot: Change filter function to avoid NULL parameter when a snapshot will be created Julio Faracco
2015-01-23  1:53 ` [Qemu-devel] " Julio Faracco
2015-01-23  1:53 ` [Qemu-trivial] [PATCH 2/2] qcow2-snapshot: Fixing bug of creating snapshots with the same name Julio Faracco
2015-01-23  1:53   ` [Qemu-devel] " Julio Faracco
2015-01-23 15:21   ` [Qemu-trivial] " Max Reitz
2015-01-23 15:21     ` Max Reitz
2015-01-27 16:42     ` [Qemu-trivial] " Julio Faracco
2015-01-27 16:42       ` Julio Faracco

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.