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

* hash.c: refactoring prior patch (getenvsize win32 specfic function).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
arton 2011-03-19 10:00:51 +00:00
parent 5281610f91
commit bdc8f4fca9

10
hash.c
View file

@ -2198,13 +2198,9 @@ envix(const char *nam)
static int
getenvsize(char* p)
{
char prev = *p++;
int len = 1;
for (; prev || *p; p++) {
prev = *p;
len++;
}
return len;
char* porg = p;
while (*p || *(p + 1)) ++p;
return p - porg + 1;
}
#endif