From bd71e4575d1a67cd8ed8c33c471c83c7fdd4ac32 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Wed, 2 Mar 2005 01:24:25 +0000 Subject: [PATCH] avoid some compiler warnings git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1879 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/testsuite/cflags.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util-vserver/lib/testsuite/cflags.c b/util-vserver/lib/testsuite/cflags.c index 678dafc..f261a7a 100644 --- a/util-vserver/lib/testsuite/cflags.c +++ b/util-vserver/lib/testsuite/cflags.c @@ -31,7 +31,7 @@ #define TEST_F2T_C(Y,X) { \ char const *x=vc_hicflag2text_compat(X); \ assert((x==0 && Y==0) || (x!=0 && Y!=0)); \ - if (x!=0 && Y!=0) assert(strcmp(x, Y)==0); \ + if (x!=0 && Y!=0) assert(strcmp(x, Y ? Y : "")==0); \ } #define TEST_LIST_C(STR,LEN,EXP,ERR_POS,ERR_LEN) { \ @@ -52,7 +52,7 @@ uint_least64_t x = (X); \ char const *rc=vc_locflag2text(&x); \ assert((rc==0 && Y==0) || (rc!=0 && Y!=0)); \ - if (rc!=0 && Y!=0) assert(strcmp(rc, Y)==0); \ + if (rc!=0 && Y!=0) assert(strcmp(rc, Y ? Y : "")==0); \ } #define TEST_LIST(STR,LEN,EXP_RES,EXP_FLAG,EXP_MASK,ERR_POS,ERR_LEN) { \ struct vc_err_listparser err; \ -- 1.8.1.5