This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/test/api test.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski@sourceware.org	2009-07-28 14:12:30

Modified files:
	test/api       : test.c 

Log message:
	Update interactive unit test - fix silly vg_close error.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/api/test.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23

--- LVM2/test/api/test.c	2009/07/28 13:49:28	1.22
+++ LVM2/test/api/test.c	2009/07/28 14:12:29	1.23
@@ -329,11 +329,11 @@
 {
 	vg_t *vg=NULL;
 
-	while((vg = dm_hash_lookup(_vgname_hash, vgname))) {
+	if ((vg = dm_hash_lookup(_vgname_hash, vgname))) {
 		dm_hash_remove(_vgid_hash, lvm_vg_get_uuid(vg));
 		dm_hash_remove(_vgname_hash, lvm_vg_get_name(vg));
 	}
-	while(vg && (vg = dm_hash_lookup(_vgid_hash, vgname))) {
+	if (!vg && (vg = dm_hash_lookup(_vgid_hash, vgname))) {
 		dm_hash_remove(_vgid_hash, lvm_vg_get_uuid(vg));
 		dm_hash_remove(_vgname_hash, lvm_vg_get_name(vg));
 	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]