diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-23 13:32:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-23 13:32:32 +0000 |
commit | ccbeb0d6dce7e38d98232f91fc0b4bbdc499674f (patch) | |
tree | c75a004c641dd5bd233915ad49352cfc272a8032 /win32/win32.c | |
parent | e6983110384f73f52e4efe9250bf162dd118ffdb (diff) | |
download | ruby-ccbeb0d6dce7e38d98232f91fc0b4bbdc499674f.tar.gz |
* win32/win32.c (cmdglob): use inline function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c index 9e6e6a39c5..61872e997a 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1485,7 +1485,6 @@ static NtCmdLineElement ** cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp) { char buffer[MAXPATHLEN], *buf = buffer; - char *p; NtCmdLineElement **last = tail; int status; @@ -1494,9 +1493,7 @@ cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp) strlcpy(buf, patt->str, patt->len + 1); buf[patt->len] = '\0'; - for (p = buf; *p; p = CharNextExA(cp, p, 0)) - if (*p == '\\') - *p = '/'; + translate_char(buf, '\\', '/', cp); status = ruby_brace_glob(buf, 0, insert, (VALUE)&tail); if (buf != buffer) free(buf); |