Browse Source

Do not check retbuf if realpath returns NULL

Carmelo Amoroso 17 năm trước cách đây
mục cha
commit
dc064d58ba
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  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,