1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (cmdglob): use inline function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-08-23 13:32:32 +00:00
parent e698311038
commit ccbeb0d6dc

View file

@ -1485,7 +1485,6 @@ static NtCmdLineElement **
cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp) cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp)
{ {
char buffer[MAXPATHLEN], *buf = buffer; char buffer[MAXPATHLEN], *buf = buffer;
char *p;
NtCmdLineElement **last = tail; NtCmdLineElement **last = tail;
int status; int status;
@ -1494,9 +1493,7 @@ cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail, UINT cp)
strlcpy(buf, patt->str, patt->len + 1); strlcpy(buf, patt->str, patt->len + 1);
buf[patt->len] = '\0'; buf[patt->len] = '\0';
for (p = buf; *p; p = CharNextExA(cp, p, 0)) translate_char(buf, '\\', '/', cp);
if (*p == '\\')
*p = '/';
status = ruby_brace_glob(buf, 0, insert, (VALUE)&tail); status = ruby_brace_glob(buf, 0, insert, (VALUE)&tail);
if (buf != buffer) if (buf != buffer)
free(buf); free(buf);