Browse Source

Do not check retbuf if realpath returns NULL

Carmelo Amoroso 16 years ago
parent
commit
dc064d58ba
1 changed files with 1 additions and 2 deletions
  1. 1 2
      test/stdlib/test-canon.c

+ 1 - 2
test/stdlib/test-canon.c

@@ -188,8 +188,7 @@ do_test (int argc, char ** argv)
 	  continue;
 	}
 
-      if ((tests[i].retval || tests[i].retbuf)
-       && !check_path (buf, tests[i].retval ? tests[i].retval : tests[i].retbuf))
+      if (result && !check_path (buf, tests[i].retval ? tests[i].retval : tests[i].retbuf))
 	{
 	  printf ("%s: flunked test %d (expected resolved `%s', got `%s')\n",
 		  argv[0], i, tests[i].retval ? tests[i].retval : tests[i].retbuf,