projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99ee3e8
)
Use strchr in \ conversion in CanonicalizePath on Windows
author
Scott Graham
<scottmg@chromium.org>
Thu, 30 Oct 2014 23:52:55 +0000
(16:52 -0700)
committer
Scott Graham
<scottmg@chromium.org>
Thu, 30 Oct 2014 23:52:55 +0000
(16:52 -0700)
src/util.cc
patch
|
blob
|
history
diff --git
a/src/util.cc
b/src/util.cc
index
66ef113
..
cb8adf1
100644
(file)
--- a/
src/util.cc
+++ b/
src/util.cc
@@
-107,9
+107,8
@@
bool CanonicalizePath(char* path, size_t* len, string* err) {
}
#ifdef _WIN32
- for (char* c = path; *c; ++c)
- if (*c == '\\')
- *c = '/';
+ for (char* c = path; (c = strchr(c, '\\')) != NULL;)
+ *c = '/';
#endif
const int kMaxPathComponents = 30;