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

[lvm-devel] LVM2/test/api percent.c



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall sourceware org	2011-01-03 15:07:40

Modified files:
	test/api       : percent.c 

Log message:
	Use system assert in test/api/percent.c, for now.

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

--- LVM2/test/api/percent.c	2010/12/21 01:14:34	1.3
+++ LVM2/test/api/percent.c	2011/01/03 15:07:39	1.4
@@ -12,9 +12,10 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "lvm2app.h"
+#undef NDEBUG
 
-#define assert(x) do { if (!(x)) goto bad; } while (0)
+#include "lvm2app.h"
+#include "assert.h"
 
 int main(int argc, char *argv[])
 {
@@ -52,13 +53,4 @@
 
         lvm_vg_close(vg);
         return 0;
-
-bad:
-	if (handle && lvm_errno(handle))
-		fprintf(stderr, "LVM Error: %s\n", lvm_errmsg(handle));
-	if (vg)
-		lvm_vg_close(vg);
-	if (handle)
-		lvm_quit(handle);
-	return 1;
 }


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