* path.cc (path_prefix_p): Optimize test order.
This commit is contained in:
		| @@ -1,3 +1,7 @@ | |||||||
|  | 2004-04-07  Pierre Humblet  <pierre.humblet@ieee.org> | ||||||
|  |  | ||||||
|  | 	* path.cc (path_prefix_p): Optimize test order. | ||||||
|  |  | ||||||
| 2004-04-06  Corinna Vinschen  <corinna@vinschen.de> | 2004-04-06  Corinna Vinschen  <corinna@vinschen.de> | ||||||
|  |  | ||||||
| 	* Makefile.in (EXTRALIBS): Add libtextreadmode.a. | 	* Makefile.in (EXTRALIBS): Add libtextreadmode.a. | ||||||
|   | |||||||
| @@ -161,10 +161,10 @@ path_prefix_p (const char *path1, const char *path2, int len1) | |||||||
|   if (len1 == 0) |   if (len1 == 0) | ||||||
|     return isdirsep (path2[0]) && !isdirsep (path2[1]); |     return isdirsep (path2[0]) && !isdirsep (path2[1]); | ||||||
|  |  | ||||||
|   if (!pathnmatch (path1, path2, len1)) |   if (isdirsep (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':') | ||||||
|     return 0; |     return pathnmatch (path1, path2, len1); | ||||||
|  |  | ||||||
|   return isdirsep (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':'; |   return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Return non-zero if paths match in first len chars. | /* Return non-zero if paths match in first len chars. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user