diff options
author | Nico Weber <thakis@chromium.org> | 2012-05-04 01:15:15 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2012-05-04 01:15:15 (GMT) |
commit | 1dc38391fe5e016fd877126337ca97a971d97e77 (patch) | |
tree | 7dc6fd8ded7868695d0aacb160d36e654fba0289 | |
parent | fa34c6da1ff24493f6c28a8a708540268b63d013 (diff) | |
download | Ninja-1dc38391fe5e016fd877126337ca97a971d97e77.zip Ninja-1dc38391fe5e016fd877126337ca97a971d97e77.tar.gz Ninja-1dc38391fe5e016fd877126337ca97a971d97e77.tar.bz2 |
Reorder a few lines, no functionality (or perf) change.
-rw-r--r-- | src/util.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/util.cc b/src/util.cc index dfae8d6..de535b3 100644 --- a/src/util.cc +++ b/src/util.cc @@ -138,18 +138,17 @@ bool CanonicalizePath(char* path, int* len, string* err) { continue; } - const char* sep = (const char*)memchr(src, '/', end - src); - if (sep == NULL) - sep = end; - if (component_count == kMaxPathComponents) Fatal("path has too many components"); components[component_count] = dst; ++component_count; + + const char* sep = (const char*)memchr(src, '/', end - src); + if (sep == NULL) + sep = end; while (src <= sep) { *dst++ = *src++; } - src = sep + 1; } |