cache_tree_find(): remove redundant checks
slash is initialized to a value that cannot be NULL. So remove the guards against slash == NULL later in the loop. Suggested-by: David Kastrup <dak@gnu.org> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
							parent
							
								
									2f93541d88
								
							
						
					
					
						commit
						72c378d8a6
					
				|  | @ -564,10 +564,9 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat | |||
| 		if (!sub) | ||||
| 			return NULL; | ||||
| 		it = sub->cache_tree; | ||||
| 		if (slash) | ||||
| 			while (*slash && *slash == '/') | ||||
| 				slash++; | ||||
| 		if (!slash || !*slash) | ||||
| 		while (*slash && *slash == '/') | ||||
| 			slash++; | ||||
| 		if (!*slash) | ||||
| 			return it; /* prefix ended with slashes */ | ||||
| 		path = slash; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Michael Haggerty
						Michael Haggerty