From: Petr Rockai Date: Mon, 3 Jan 2011 15:07:39 +0000 (+0000) Subject: Use system assert in test/api/percent.c, for now. X-Git-Tag: old-v2_02_80~50 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=f56007d95f8a1d8c21441b7e2a59f01d2b017cc7;p=lvm2.git Use system assert in test/api/percent.c, for now. --- diff --git a/test/api/percent.c b/test/api/percent.c index a3be1eb53..7d3859e71 100644 --- a/test/api/percent.c +++ b/test/api/percent.c @@ -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 @@ int main(int argc, char *argv[]) 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; }