X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=read-cache.c;h=da2adf4612c3a1cb39fbb76e303302e9b7e1356b;hb=2a45925180152b3e54248de4d7f69e8cc5c4051f;hp=47aa2d446958e48623bc1bdf3675799a9d851cdb;hpb=192268c197c0f143989662f648b1d900014e7d89;p=git.git diff --git a/read-cache.c b/read-cache.c index 47aa2d44..da2adf46 100644 --- a/read-cache.c +++ b/read-cache.c @@ -152,7 +152,7 @@ static int check_file_directory_conflict(const struct cache_entry *ce, cp = pathbuf; while (1) { char *ep = strchr(cp, '/'); - if (ep == 0) + if (!ep) break; *ep = 0; /* first cut it at slash */ pos = cache_name_pos(pathbuf,