Parcourir la source

Do not check retbuf if realpath returns NULL

Carmelo Amoroso il y a 17 ans
Parent
commit
dc064d58ba
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  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,